1. Plugin ktory będzie ograniczał możliwość uzycia pułpaki przez terroryste tylko raz (inny niż "use_button_once"
Co jest w nim złego?
3.
Kod php:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#define PLUGIN "allow tt to say /free"
#define VERSION "1.0"
#define AUTHOR "naven"
new bool:g_free_enabled;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /free", "func_free")
register_logevent("Poczatek_Rundy", 2, "1=Round_Start")
register_event("CurWeapon","CurWeapon","be", "1=1")
RegisterHam( Ham_Touch, "weaponbox", "HamTouchPre", 0 )
RegisterHam( Ham_Touch, "armoury_entity", "HamTouchPre", 0 )
}
public func_free(id)
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
g_free_enabled = true;
client_print(0, print_chat, "TT said /free so CT's cannot pickup weapons until round finish")
}
}
public Poczatek_Rundy()
{
g_free_enabled = false;
}
public CurWeapon(id)
{
if(cs_get_user_team(id) == CS_TEAM_CT && g_free_enabled)
{
strip_user_weapons(id)
}//I'm not sure if it's correct, this should no longer be called since client has no weapon?
}
public HamTouchPre(weapon)
{
if(g_free_enabled)
{
return HAM_SUPERCEDE; // blocks function call
}else
{
return HAM_IGNORED;
}
return HAM_IGNORED;
}