AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   shield for TS?? (https://forums.alliedmods.net/showthread.php?t=98609)

sulb 07-27-2009 06:20

shield for TS??
 
Quote:

#pragma tabsize 0
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#define SOUND "items/gunpickup2.wav"
#define WEAPON "weapon_shield"
#define REASON "Tactical Shield is restricted for CTs!"
public plugin_init()
{
register_plugin("Drop Shields","0.1","Dizzy")
register_cvar("amx_dropshields","1")
register_forward(FM_EmitSound, "forward_emit_sound")
}
public forward_emit_sound(ent, chan, snd[]) {
if (equal(snd, SOUND) && get_cvar_num("amx_dropshields") && drop_ct_shields())
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
stock bool:drop_ct_shields() {
new cts[32], num, bool:result = false, id
get_players(cts, num, "ae", "CT")
for (new i = 0; i < num; ++i) {
id = cts[i]
if (cs_get_user_shield(id)) {
result = true
engclient_cmd(id, "drop", WEAPON)
client_print(id, print_center, REASON)
}
}
return result
}
how change ts

sulb 07-27-2009 08:03

Re: shield for TS??
 
or all player
not ct and ts
i dont change


All times are GMT -4. The time now is 18:24.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.