Dialog Login - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog Login (
/showthread.php?tid=478161)
Dialog Login -
Gianmarco - 28.11.2013
-I have a problem, basically when you register a player spawns, and then when slogga rilogga password authentication "Password Incorrect" There is, as I upload?
-Another problem is that if the player is an admin, when you login and spawn, the login dialog reappears endlessly.
Код:
if(dialogid == 2)
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
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);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
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), "~w~Welcome ~n~~y~ %s", GetName(playerid));
GameTextForPlayer(playerid, tmp2, 5000, 1);
TogglePlayerSpectating(playerid, 0);
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Login","Benvenuto su SouthCity RolePlay\n\nQuesto account и giа esistente. Inserisci la tua password per effettuare il Login.","Login","Slogga");
}
return 1;
}
}
}
}
Re: Dialog Login -
ikbenremco - 28.11.2013
Try dis.
PHP код:
if(dialogid == 2)
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
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);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
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), "~w~Welcome ~n~~y~ %s", GetName(playerid));
GameTextForPlayer(playerid, tmp2, 5000, 1);
TogglePlayerSpectating(playerid, 0);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Login","Benvenuto su SouthCity RolePlay\n\nQuesto account и giа esistente. Inserisci la tua password per effettuare il Login.","Login","Slogga");
}
}
}
return 1;
}
Re: Dialog Login -
Gianmarco - 28.11.2013
and the dialog of login? insert password?
Re: Dialog Login -
ikbenremco - 28.11.2013
Editted my previous post.
Does that work?