01.05.2014, 08:19
After registering an account, I spawn at the correct spot with all the information correctly prompted.
Whenever I relog or restart the server, I spawn at blueberry in CJ skin and 0 HP (Dead).
My server log says: "Bible died 255".
LOGIN_DIALOG
If you need more information regarding my script or the problem, let me know.
Help is much appreciated.
Sincerely,
Bible
Whenever I relog or restart the server, I spawn at blueberry in CJ skin and 0 HP (Dead).
My server log says: "Bible died 255".
LOGIN_DIALOG
pawn Код:
if(dialogid == DIALOG_LOGIN)
{
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
gPlayerLogged[playerid] = 1;
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pLastX], PlayerInfo[playerid][pLastY], PlayerInfo[playerid][pLastZ], PlayerInfo[playerid][pFacingAngle], 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
format(tmp2, sizeof(tmp2), "~g~Welcome ~n~~w~ %s", GetName(playerid));
GameTextForPlayer(playerid, tmp2, 5000, 1);
TogglePlayerSpectating(playerid, 0);
TogglePlayerControllable(playerid, 1);
SetPlayerColor(playerid, TRANSPARENT_WHITE);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(tmp2, sizeof(tmp2), "[SERVER] You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE,tmp2);
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","{FFFFFF}Welcome back to {00FF26}SERVER NAME!{FFFFFF}\n\nThat name is registered. Please enter your password below.\n\n{FF0000} You have entered an incorrect password!","Login","Quit"); //login
}
}
if(!response)
{
format(qstring, sizeof(qstring), "[AdmCMD] You have chosen to 'Quit', you're always welcome to come back!");
SCM(playerid, COLOR_LIGHTRED, qstring);
SetTimerEx("kickbugfix", 1000, false, "i", playerid);
}
}
Help is much appreciated.
Sincerely,
Bible