15.10.2017, 20:25
Ok so i made a dm server now all of a sudden "pInfo[playerid][Logged]" doesnt work anymore to see if the player is loggedin but it wont work, i set it under the dialog where the player logs in but yet it doesnt set them as logged in and is preventing them from saving there accounts or using commands... Here is the coding
PHP код:
case DIALOG_ACCLOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == pInfo[playerid][Pass])
{
new file[100];
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in to your Account!","Ok","");
GetPlayerIp(playerid,pIP,16);
format(file, 100, PATH, GetName(playerid));
new INI:ACCOUNT = INI_Open(file);
INI_SetTag(ACCOUNT,"data");
INI_WriteString(ACCOUNT, "LastLoggedIP", pIP);
INI_Close(ACCOUNT);
SetPlayerScore(playerid, pInfo[playerid][Score]);
GivePlayerCash(playerid, pInfo[playerid][Cash]);
SetPlayerPos(playerid,1918.1643,1175.7311,18.2846);
SetPlayerCameraLookAt(playerid,1918.1643,1175.7311,18.2846);
SetPlayerCameraPos(playerid,1908.1575,1175.7079,18.2846);
SetPlayerFacingAngle(playerid,91.2061);
pInfo[playerid][Logged] = 1; //This is where i set them as logged in but it doesn't work
SetTimerEx("pTime", 1000, true, "i", playerid);
}