29.04.2010, 18:19
Hey guys, I need help
I have a server and some guys that got banned want to take revenge with cheat, so they spawn allowed weapons and then kill players...
so i tryed to make a code when a player spawns ingame, the server checks if he is under lvl 2 and then if he have any weapons, if that returns true, the server should reset his weapons
this is what i made:
i tryed to put that timer under OnPlayerSpawn, under OnPlayerConnect and even in OnGameModeInit but nothing happens
Why?
(i know that this code would reset all players weapons every 3 seconds, i just want to know where i made a mistake)
If you help me to get this code to work, then i will add a check for if(PlayerInfo[playerid][pLevel] < 2) so cheaters and players lvl 1 can't get weapons
I have a server and some guys that got banned want to take revenge with cheat, so they spawn allowed weapons and then kill players...
so i tryed to make a code when a player spawns ingame, the server checks if he is under lvl 2 and then if he have any weapons, if that returns true, the server should reset his weapons
this is what i made:
Код:
forward GunTimer(playerid); public GunTimer(playerid) { ResetPlayerWeapons(playerid); } then i made: SetTimer("GunTimer", 3000, 1);
Why?
(i know that this code would reset all players weapons every 3 seconds, i just want to know where i made a mistake)
If you help me to get this code to work, then i will add a check for if(PlayerInfo[playerid][pLevel] < 2) so cheaters and players lvl 1 can't get weapons