17.10.2017, 04:05
OMG this register system i made it right, and then if i set player A to be an admin it will set and it will save, good.. Now if player B comes online and register he will get the stats of player A, resulting in him also being admin, anyways i then made a resetvariable(playerid);, which is called when the players (dis)connect, now i place this coding under the resetvariable function
Which should reset the function for the player which also works, now when player A reconnects he doesn't have the admin status because of the function i have created. It will set the players admin level to 0 resulting he/she not being a server admin anymore...
I have even seen the same pinfo[][] =0; in other admin systems and it doesn't result in what im getting
PHP код:
pInfo[playerid][Admin] = 0;
PHP код:
ResetVariables(playerid)
{
PlayerTemp[playerid][OnDuty] = 0;
PlayerTemp[playerid][OnhDuty] = 0;
PlayerTemp[playerid][Spawned] = 0;
PlayerTemp[playerid][isevent] = 0;
PlayerTemp[playerid][MaxRcon] = 0;
PlayerTemp[playerid][Jetpack] = 0;
PlayerTemp[playerid][LastShot] = 0;
PlayerTemp[playerid][LastShotTick] = 0;
PlayerTemp[playerid][dSpawnedCars] = 0;
PlayerTemp[playerid][pSpawnFreeze] = 0;
PlayerTemp[playerid][LoginAttempts] = 0;
//these are all that reset to 0 below
pInfo[playerid][Score] = 0;
pInfo[playerid][Kills] = 0;
pInfo[playerid][Deaths] = 0;
pInfo[playerid][Banned] = 0;
pInfo[playerid][Admin] = 0;
/*^^^^^^^^^^^^^^^^^^^^^^^^^*/
NeedsHelp[playerid] = 0;
ReportTime[playerid] = 0;
Delete3DTextLabel(afklabel[playerid]);
Delete3DTextLabel(adminlabel[playerid]);
}