Y_Ini doubles the file
#1

Y_ini this doubling variables Players

Since GM and review other statutes saw and I see nothing wrong with my gm



PHP код:
public OnPlayerConnect(playerid)
{
    if(
IsPlayerNPC(playerid)) return Kick(playerid);
    
TogglePlayerSpectating(playeridtrue);
    
SendBlankMessages(playerid20);
    for(new 
pInfo:ipInfoi++)
    {
        
PlayerInfo[playerid][i] = 0;
    }
    
SetTimerEx("OnPlayerConnected"750false"i"playerid);
    return 
1;

PHP код:
public OnPlayerConnected(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
    
SendBlankMessages(playerid20);
    if(
fexist(UserPath(playerid)))
    {
    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"GM TEST","Enter your password","Login","Quit");
    }
    else
    {
    
ShowPlayerDialog(playeridDIALOGO_REGISTRODIALOG_STYLE_INPUT,"GM Register","Welcome\nEnter a password to register","Register","Quit");
    }
    }
    return 
1;

PHP код:
case DIALOGO_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);
                    
SetPVarInt(playerid"gLogged"1);
                    
TogglePlayerSpectating(playeridfalse);
                    
TogglePlayerControllable(playerid0);
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,""GM TEST",""cBlanco"Please login password tuto accede to the server.","Login","Quit");
                }
                return 1;
            }
        } 
PHP код:
public LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Pass"PlayerInfo[playerid][pPass]);
    
INI_Int("Admin"PlayerInfo[playerid][pAdmin]);
    
INI_Int("Sex"PlayerInfo[playerid][pSex]);
    
INI_Float("PositionX"PlayerInfo[playerid][pPositionX]);
    
INI_Float("PositionY"PlayerInfo[playerid][pPositionY]);
    
INI_Float("PositionZ"PlayerInfor[playerid][pPositionZ]);
    
INI_Float("Angule"PlayerInfo[playerid][pAngule]);
    
//++ functiones
    
return 1;

I realized that connecting is dublica

Al gm did this tutorial
https://sampforum.blast.hk/showthread.php?tid=273088
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)