0.3d R2 - Kicked when spawning
#1

When I spawn, I get kicked. Simple as. I just see 'Server closed the connection'. It doesn't happen on 0.3d R1 (original). I tested with both clients (R1 and R2) on the R1 server. It IS a server problem. I am using Incognito's streamer, BlueG's mySQL, MapAndreas and sscanf2 (plugins).

I commented out ALL Kick()'s and disabled all filterscripts, and it still happened. It's either SA:MP or a plugin, and I'm pretty sure none of the plugins use Kick().

I saw in the 0.3d R2 topic that a bug with slots not freeing up after players being kicked was fixed, but this seems to have caused this new problem.

It doesn't, however, kick me on a blank gamemode.

EDIT: I did some debugging, turns out I get kicked _BEFORE_ OnPlayerSpawn is called - how is that possible?

Quote:

OnDialogResponse - (2 1 -1 #)
OnPlayerDisconnect
OnPlayerSpawn

EDIT #2:

More information to perhaps help Kalcor idenfity the problem:

When players connect, I SpawnPlayer() then TogglePlayerSpectating(playerid, true);
Then I set their camera etc. and show a dialog for login.
It all works fine. Then I use TogglePlayerSpectating(playerid, false) under OnDialogResponse when they login. This is where the problem seems to be, but Kick() is not used in ANY dialogs!
The last line in OnDialogResponse (in the block for 'if(dialogid == DIALOG_LOGIN)' is a clientmessage, and it gets sent before I get kicked.
Reply
#2

Player got kicked whenever SpawnPlayer(); has been called. This bug has been introduced in 0.3d R2

Please fix it SA-MP team.
Reply
#3

SpawnPlayer() works fine for me in the 0.3d R2 server and the 0.3d R2-800p server. and i haven't been kicked. if it is a problem in sa-mp that happens under certain circumstances maybe you should share your code
Reply
#4

I use SpawnPlayer quite a lot in my code, and I have no problems...
Reply
#5

Well it seems to happen between callback calls, because the callbacks called were dialogresponse then onplayerspawn, and neither of them caused it, because the last line was a clientmessage which got sent BEFORE the kick.
Reply
#6

Same problem for me, I use incognito's streamer too, but none of the other things. Chances are that's causing it.. i'll try troubleshooting too and post here if I fix the problem
Reply
#7

I tried removing the streamer entirely from my script, didn't work, still 'server closed connection' immediately upon spawning.
Reply
#8

I have found the problem. It's caused by

TogglePlayerSpectating(playerid, false);

Please fix this.

EDIT:

I changed

TogglePlayerSpectating(playerid, false);

to

SpawnPlayer(playerid);

and it happened again.

EDIT:

Here's a GM to replicate it: http://pastebin.com/3nMMFgnV

The logincam code is based on the grand larceny GM.

Here's an alternative code, using a timer instead of dialogs, which rules out dialogs being the cause: http://pastebin.com/9D5ntxtA
Reply
#9

Quote:
Originally Posted by MP2
View Post
I have found the problem. It's caused by

TogglePlayerSpectating(playerid, false);

Please fix this.

EDIT:

I changed

TogglePlayerSpectating(playerid, false);

to

SpawnPlayer(playerid);

and it happened again.
I also can't figure out the problem
Reply
#10

if you dont use the classselection then you should use SetSpawnInfo before spawning your players with SpawnPlayer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)