Zeit
Участник
- Сообщения
- 180
- Реакции
- 34
CS_OnCSWeaponDrop:#include <sdktools_entinput> #define SZF(%0) %0, sizeof(%0) public Action CS_OnCSWeaponDrop(int iClient, int iWeapon) { char sWeapon[32]; GetEdictClassname(iWeapon, SZF(sWeapon)); if(StrEqual(sWeapon, "weapon_snowball")) { AcceptEntityInput(iWeapon, "Kill"); // или return Plugin_Handled; // чтоб вообще не выкидывались } return Plugin_Continue; }
Это при условии что у тебя нет никаких там, дуэлей, нестандартных раундов, а так еще шаманить надо будет.
Тебе как вариант еще удалять каждые N секунд разбросанные(дропнутые) снежки по карте. Из 3 в запасе, один сцука дропается. "3" это у меня максимум снежков, может у тебя 99, хз что там будет вообще.
timer:Handle hTimer; public void OnMapStart() { hTimer = CreateTimer(30., timer_del_snow, _, TIMER_REPEAT); } public void OnMapEnd() { delete hTimer; } Action timer_del_snow(Handle timer) { int iMaxEntities = GetMaxEntities(); char sWeapon[64]; for(int i = MaxClients; i < iMaxEntities; i++) { if(IsValidEdict(i) && IsValidEntity(i)) { GetEdictClassname(i, sWeapon, sizeof sWeapon); if((StrContains(sWeapon, "weapon_snowball") != -1) { RemoveEdict(i); } } } return Plugin_Continue; } public Action CS_OnCSWeaponDrop(int iClient, int iWeapon) { char sWeapon[32]; GetEdictClassname(iWeapon, SZF(sWeapon)); if(StrEqual(sWeapon, "weapon_snowball")) { AcceptEntityInput(iWeapon, "Kill"); } return Plugin_Continue; }
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(5) : error 001: expected token: "-identifier-", but found ","
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(25) : error 001: expected token: ")", but found "{"
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(30) : warning 217: loose indentation
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(35) : error 017: undefined symbol "SZF"
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(38) : error 017: undefined symbol "AcceptEntityInput"
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(25) : error 001: expected token: ")", but found "{"
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(30) : warning 217: loose indentation
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(35) : error 017: undefined symbol "SZF"
// C:\Users\User\Desktop\comp\scripting\SnowballDropFix.sp(38) : error 017: undefined symbol "AcceptEntityInput"