26.06.2012, 12:40
(
Последний раз редактировалось Dodo9655; 26.06.2012 в 14:51.
)
When a player registers, SpawnPlayer is called, but it doesn't work, I still see the spawn screen, and I have to click Spawn manually to spawn. Why is that, since SpawnPlayer is called when a player registers.
Here's my register code
Here's my register code
pawn Код:
case DIALOG_REGISTER:
{
if(!response)
{
SendErrorMessage(playerid, "You need to register in order to play!");
Kick(playerid);
}
else
{
if(strlen(inputtext) < 4)
{
SendErrorMessage(playerid, "Your password needs to have more than 3 characters.");
return SendPlayerDialog(playerid, DIALOG_REGISTER);
}
new password[129],
query[412];
WP_Hash(password, sizeof(password), inputtext);
format(query, sizeof(query), "INSERT INTO `Players` (`Name`, `Password`, `AdminLevel`, `Health`, `Armour`) VALUES ('%s', '%s', 0, 100.0, 0.0)", db_escape(GetName(playerid)), db_escape(password));
db_free_result(db_query(Database, query));
SendSuccessMessage(playerid, "You have registered!");
SetSpawnInfo(playerid, NO_TEAM, 299, 1677.6185, 1447.7749, 10.7757, 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
}