22.01.2015, 19:47
So basically, I've been facing a problem, it's when I turn off the spectating mode, the server closes the connection. Let me describe what I wanted to do.
I wanted to disable the class selection (spawn buttons) and put a dialog instead.
After the player's logged in to the server, it puts him/her in the spectating mode and when the player attempts to spawn (using the dialog I made), the server closes the connection.
Code:
I don't know if you understood what I mean but I hope you did.
I wanted to disable the class selection (spawn buttons) and put a dialog instead.
After the player's logged in to the server, it puts him/her in the spectating mode and when the player attempts to spawn (using the dialog I made), the server closes the connection.
Code:
pawn Code:
if(dialogid == DIALOG_SELECT)
{
if(!response)
{
KickPlayer(playerid,500);
}
else
{
if(listitem == 0)
{
TogglePlayerSpectating(playerid, false); // At this point, the server closes the connection.
SetPlayerTeam(playerid, 0);
}
}
}