←  Dodatki

AMXX.pl: Support AMX Mod X i SourceMod

»
Wklejka 132742301013054 dodana przez forma, 24.01.2012 17:36
Typ:


132742301013054
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
 
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define FLAGA ADMIN_LEVEL_H
 
 
new mpd, mkb, mhb
new maxplayers
 
 
 
 
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
        mpd = register_cvar("kasa_obrazenia","3")
        mkb = register_cvar("kasa_za_zabicie","200")
        mhb = register_cvar("kasa_z_hs","400")
	 register_event("Damage","Damage","b")
        register_event("DeathMsg","death_msg","a")
 
maxplayers = get_maxplayers()
 
	RegisterHam(Ham_Spawn, "player", "daj", 1);
}
 
public daj(id){
 
	if (get_user_flags(id) & FLAGA) 
	{
		if(is_user_alive(id))
		{
			give_item(id, "weapon_deagle") 	
			give_item(id,"ammo_50ae") 
			give_item(id,"ammo_50ae") 
			give_item(id,"ammo_50ae") 
			give_item(id,"ammo_50ae") 
			give_item(id, "item_thighpack")  
			give_item(id, "item_kevlar")
			give_item(id, "item_assaultsuit")
			 give_item(id, "weapon_hegrenade")  
			 give_item(id, "weapon_flashbang")
			 give_item(id, "weapon_smokegrenade") 
		}	
	}
}
public Damage(id)
{
        new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
        if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
        if (get_user_flags(attacker) & FLAGA) 
        {
                new money = read_data(2) * get_pcvar_num(mpd)
                if(hitpoint==1) money += get_pcvar_num(mhb)
                cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
        }
}
 
public death_msg()
{
        if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}