Why doesn't this work? ;S
#1

This code should be a simple weapon hacker ban thingy but for some odd reason it bans random ppl when they spawn...

Код:
forward UpdatePlayer(playerid);
public UpdatePlayer(playerid)
{
	new string[128];

	if((GetPlayerWeapon(playerid) == 35) || (GetPlayerWeapon(playerid) == 36) || (GetPlayerWeapon(playerid) == 37) || (GetPlayerWeapon(playerid) == 38))
	{
	    format(string,sizeof(string),"[BANNED] System banned %s [REASON: Weapon hack]",pInfo[playerid][name]);
	    SendClientMessageToAll(COLOR_WHITE,string);
	    Ban(playerid);
		KillTimer(UpdateTimer[playerid]);
	}
return 1;
}
Ive got the UpdatePlayer timer all set up and I know it works because I've got other stuff in that timer aswel...
Cheers.
Reply
#2

Don't know for sure, but...

pawn Код:
KillTimer(UpdateTimer[playerid]);
Should be OnPlayerDisconnect or FilterScriptExit
Reply
#3

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
Don't know for sure, but...

pawn Код:
KillTimer(UpdateTimer[playerid]);
Should be OnPlayerDisconnect or FilterScriptExit
It's there to stop the message from spamming... (The timer is set to 1sec interval...)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)