Problem with login/register system -
martinyakimov25 - 10.06.2017
Hello,
I create gamemode. I use login/register system from this forum's tutorial with Y_INI. In registration I have
Код:
INI_WriteInt(File,"HERE IS VARIABLE",0);
. The problem is sometimes when person registering in my server(I use free hosting), he have my permision(5 level admin, 3 level VIP, my faction and leader on my faction). Where is a problem? I will give you +REP

Sorry for my bad English!
Thank you and have a nice day!
Re: Problem with login/register system -
Amads - 10.06.2017
Do you reset player variables to 0 in OnPlayerConnect?
Re: Problem with login/register system -
DRIFT_HUNTER - 10.06.2017
dont use spaces and special characters in variable names, use underscore if you have to.
Re: Problem with login/register system -
Kane - 10.06.2017
Reset their variables, as Amads is referring too.
i.e:
PHP код:
public OnPlayerConnect(playerid)
{
ResetPlayer(playerid);
return 1;
}
ResetPlayer(playerid)
{
PlayerData[playerid][pAdmin] = 0;
PlayerData[playerid][pLevel] = 0;
PlayerData[playerid][pFaction] = 0;
PlayerData[playerid][pVIP] = 0;
return 1;
}
Re: Problem with login/register system -
martinyakimov25 - 10.06.2017
I reset in dialog fuction. Thank you very much. I will test you answers.
Re: Problem with login/register system -
ThomasEvil - 10.06.2017
Код:
public OnPlayerDisconnect(playerid, reason)
{
//code before
INI_WriteInt(File,"HERE IS VARIABLE",0);
INI_Close(file);
PlayerInfo[playerid][pAdmin] = 0;
//RESET ALL ENUM info
}
Re: Problem with login/register system -
martinyakimov25 - 11.06.2017
Quote:
Originally Posted by ThomasEvil
Код:
public OnPlayerDisconnect(playerid, reason)
{
//code before
INI_WriteInt(File,"HERE IS VARIABLE",0);
INI_Close(file);
PlayerInfo[playerid][pAdmin] = 0;
//RESET ALL ENUM info
}
|
Why I need from this?
Re: Problem with login/register system -
ThomasEvil - 11.06.2017
You need it to reset playerid.
If Player0 with id 0 disconnect and then Player1 come to the server ,
Player1 get stats from Player0 because both of them are id 0. Understand?
Reset it.