24.07.2014, 19:50
Y_ini this doubling variables Players
Since GM and review other statutes saw and I see nothing wrong with my gm
![](http://i58.tinypic.com/21kcn6o.png)
I realized that connecting is dublica
Al gm did this tutorial
https://sampforum.blast.hk/showthread.php?tid=273088
Since GM and review other statutes saw and I see nothing wrong with my gm
![](http://i58.tinypic.com/21kcn6o.png)
PHP код:
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) return Kick(playerid);
TogglePlayerSpectating(playerid, true);
SendBlankMessages(playerid, 20);
for(new pInfo:i; i < pInfo; i++)
{
PlayerInfo[playerid][i] = 0;
}
SetTimerEx("OnPlayerConnected", 750, false, "i", playerid);
return 1;
}
PHP код:
public OnPlayerConnected(playerid)
{
if(IsPlayerConnected(playerid))
{
SendBlankMessages(playerid, 20);
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"GM TEST","Enter your password","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOGO_REGISTRO, DIALOG_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(playerid, false);
TogglePlayerControllable(playerid, 0);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""GM TEST",""cBlanco"Please login password tu, to 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;
}
Al gm did this tutorial
https://sampforum.blast.hk/showthread.php?tid=273088