Bug in the system of registration and login.
#6

You didn't give SetTimer a playerid parameter, so anyone logging in with a name longer than 10 characters would kick player 0, whoever he is.
A player connects at id 15 for example, with a name of 18 characters.
Playerid 15 will see the error-message, but the timer will kick player 0, not 15.
Use SetTimerEx instead and supply the playerid like this:
pawn Код:
SetTimerEx("TimerKick", 500, 0, "i", playerid);
Also, you're using global textdraws for all players.
When you update the string of such textdraws, they are modified for all players at once.
You're setting the text of TextInicial[11] to the newly connected player's name, but that textdraw is shown for anyone.
So it will always display the last logged in player's name.

So, first John connects, his name will be set as text in that textdraw.
Then Marie connects, the textdraw is updated again.
Now both John and Marie will see Marie's name on that textdraw.

Use PlayerTextDraws instead to keep them separate.

Other than that, I can't see anything else wrong here in that part of the code.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)