22.04.2017, 11:50
It works perfect, but how can I do that when the cinematic finish, the player get to a X position, because I have this...
But the player don't get in the position, and OnPlayerSpawn is called twice...
Код:
case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { new skin, Float:x, Float:y, Float:z; skin = PlayerInfo[playerid][pSkin]; x = PlayerInfo[playerid][pPos_x]; y = PlayerInfo[playerid][pPos_y]; z = PlayerInfo[playerid][pPos_z]; INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); SetSpawnInfo(playerid, 0, skin, x, y, z, 0, 0, 0, 0, 0, 0, 0); TogglePlayerSpectating(playerid, 0); SpawnPlayer(playerid); SetCameraBehindPlayer(playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Has introducido una contraseсa incorrecta.\nIntroduce tu contrseсa para loguearte.","Login","Salir"); } return 1; } }