20.04.2017, 22:29
I have added a cinematic while you're in the Login dialog, but it doesn't appear, i don't know why.
Код:
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
ClearChatbox(playerid);
ClearChatbox(playerid);
ClearChatbox(playerid);
InterpolateCameraPos(playerid, 1248.241333, 153.582839, 25.311567, 1370.322875, 431.673645, 24.460834, 30000);
InterpolateCameraLookAt(playerid, 1250.376098, 158.097091, 25.058088, 1372.360595, 436.238433, 24.562707, 30000);
TogglePlayerSpectating(playerid, 1);
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Bienvenido!","Introduce tu contraseсa para loguearte:","Log-in","Salir");
}
return 1;
}
Код:
OnDialogResponse...
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);
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid, 0);
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;
}
}


