Some sort of new security feature?? or a 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: Some sort of new security feature?? or a bug? (
/showthread.php?tid=345591)
Some sort of new security feature?? or a bug? -
iTorran - 25.05.2012
A 100ms timer is set when "OnPlayerConnect" is called.
pawn Код:
SetTimerEx("OnPlayerConnectEx", 100, 0, "i", playerid);
In "OnPlayerConnectEx" I have the following code:
pawn Код:
TogglePlayerSpectating(playerid, 1);
ShowPlayerDialog(.....);
All goes fine, and I have this code at "OnDialogResponse":
pawn Код:
TogglePlayerSpectating(playerid, 0);
Now, when testing the script yesterday, the server would spawn me and then kick me "Server closed the connection."
When I went to test it today, it worked fine, with the exact same script.. Now, it may be gone for now, but I want to make sure it's gone forever!
Does anyone know why it was kicking me? (I tried 6-7 times yesterday with several server restarts and script changes)
This worked fine in previous versions of SA-MP
Re: Some sort of new security feature?? or a bug? -
milanosie - 25.05.2012
If you are on OnPlayerRequestClass too long it wil kick you,
Use SpawnPlayer(playerid) at OnPlayerRequestClass