Hello everybody I have a problem with SpawnPlayer(playerid); function. I use it when player want to spawn, but player don't spawn I don't know why...
Код:
if(dialogid == 1)
{
if(response)
{
new query[200],playerName[ MAX_PLAYER_NAME ];
GetPlayerName(playerid,playerName,MAX_PLAYER_NAME);
format(query,200,"SELECT Vardas,Slaptazodis FROM players WHERE Vardas='%s' AND Slaptazodis='%s'",playerName,inputtext);
mysql_query(query);
mysql_store_result();
new rows = mysql_num_rows();
mysql_free_result();
if(rows == 1)
{
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid, false);
SendClientMessage(playerid,-1,"Prisijungėte!");
playerDB[playerid][authstate]=2;
}
else
{
SendClientMessage(playerid,-1,"Slaptaћodis neteisingas");
LoginDialog(playerid);
}
}
else if(!response)
{
Kick(playerid);
}
return 1;
}