SA-MP Forums Archive
Toggle BUG - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Toggle BUG (/showthread.php?tid=459266)



Toggle BUG - kodiak - 21.08.2013

Hello guys. I have problem with script.
When I login to the server, click the "Spawn" server kick me, and in server_log i got this:

Код:
[21:23:10] [join] Michael_Cardello has joined the server (0:89.201.180.44)
[21:23:14] [part] Michael_Cardello has left the server (0:2)
[21:23:14] AntiBot: [wrong player ID] [h_TogglePlayerControllable] [0]
And there is a script code:

Код:
stock h_TogglePlayerControllable(playerid, tog)
{
	if(IsPlayerConnected(playerid))
	{
	    if(tog == 0)
	    {
	        hFreezed[playerid] = 1;
	        TogglePlayerControllable(playerid, 0);
		}
		else if(tog == 1)
		{
		    hFreezed[playerid] = 0;
		    TogglePlayerControllable(playerid, 1);
		}
		else printf("AntiBot: [wrong TOG id] [h_TogglePlayerControllable] [%d]", tog);
	}
	else printf("AntiBot: [wrong player id] [h_TogglePlayerControllable] [%d]", playerid);
	return 1;
}