08.11.2017, 09:06
The script we're making should contain a skin saving and skipping class selection when logging in.The issue with this is that when player tries to log in,nothing happens.Just like this: https://imgur.com/gallery/9PfVe
Login case:
OnPlayerSpawn:
Thanks in advance.
Login case:
Код:
case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); SetPVarInt(playerid,"Alevel",PlayerInfo[playerid][pALevel]); SetPVarInt(playerid,"VIP",PlayerInfo[playerid][pVIP]); SpawnPlayer(playerid); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit"); } return 1;
Код:
public OnPlayerSpawn(playerid) { SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0); if(PlayerInfo[playerid][NewReg] == 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerPos(playerid, PlayerInfo[playerid][Xpos], PlayerInfo[playerid][Ypos], PlayerInfo[playerid][Zpos]+0.3); } return 1; }