Help with register system
#1

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
PHP код:
pInfo[playerid][Admin] = 0
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...

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]);
  

I have even seen the same pinfo[][] =0; in other admin systems and it doesn't result in what im getting
Reply


Messages In This Thread
Help with register system - by 1fret - 17.10.2017, 04:05
Re: Help with register system - by Escobabe - 17.10.2017, 08:01
Re: Help with register system - by Kane - 17.10.2017, 08:15
Re: Help with register system - by scripter111 - 17.10.2017, 10:35
Re: Help with register system - by StrikerZ - 17.10.2017, 13:11
Re: Help with register system - by Prokill911 - 17.10.2017, 13:20
Re: Help with register system - by StrikerZ - 17.10.2017, 13:30
Re: Help with register system - by Mado - 17.10.2017, 14:04
Re: Help with register system - by StrikerZ - 17.10.2017, 14:07
Re: Help with register system - by Mado - 17.10.2017, 14:45

Forum Jump:


Users browsing this thread: 1 Guest(s)