new bool:Login = false;
forward SkipRequestClass(playerid); public SkipRequestClass(playerid) { new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); Load_Info(playerid); SpawnPlayer(playerid); return 1; }
if(!strcmp(hashpass, PlayerInfo[playerid][Password])) { SendClientMessage(playerid, 0x00FF00FF,"You have succesfully logged in"); Login = true; }
{ if(Login == true) { SetTimerEx("SkipRequestClass", 1, false, "i", playerid); Login = false; } return 1; }
I noticed that the ClassSelection screen has to show before it will spawn you. Try putting something like this is your script...
At the top of your script Код:
new bool:Login = false; Код:
forward SkipRequestClass(playerid); public SkipRequestClass(playerid) { new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); Load_Info(playerid); SpawnPlayer(playerid); return 1; } Код:
if(!strcmp(hashpass, PlayerInfo[playerid][Password])) { SendClientMessage(playerid, 0x00FF00FF,"You have succesfully logged in"); Login = true; } Код:
{ if(Login == true) { SetTimerEx("SkipRequestClass", 1, false, "i", playerid); Login = false; } return 1; } |
error 017: undefined symbol "Load_Info"
And I did not get where to put it, under the login dialog, would you explain? |
stock Load_Info(playerid) { INI_ParseFile(PPath(playerid), "Load_Account_User", .bExtra = true, .extra = playerid); }
Explain what does it load?
Then I'll know what to do. And where to put that last part where you said "put it under the login dialog" By the way, thank you so much for the help. |
stock Load_Info(playerid) { INI_ParseFile(PPath(playerid), "Load_Account_User", .bExtra = true, .extra = playerid); }
stock PPath(playerid) { new PlayerFile[128], Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name)); format(PlayerFile, sizeof(PlayerFile), PPATH, Name);//PPATH is a define at the top of your script that defines the player's file location like this PPATH "Users/%s.ini" return PlayerFile; }
if(!strcmp(hashpass, PlayerInfo[playerid][Password])) { SendClientMessage(playerid, 0x00FF00FF,"You have succesfully logged in"); Login = true; }
case(DIALOG_LOGIN): { if(!response) { Kick(playerid); } else if(response) { new hashpass[129], pCarName[64]; WP_Hash(hashpass, sizeof(hashpass), inputtext); if(!strcmp(hashpass, PlayerInfo[playerid][Password])) { SendClientMessage(playerid, 0x00FF00FF,"You have succesfully logged in."); Login = true; } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","{FF0000}You have entered an Incorrect password!\n{FFFFFF}Please enter your Correct password to login.","Login","Quit"); return 1; } return 1; } return 1; }