[HELP] My register system goes nuts...
#1

I dont know what's happening...
But sometimes when I'm checking player's .ini after registering, some of them got admin levels... and some not...
It's like, the script gives admin powers automaticly to some players.

Example, I just checked a new player, he got admin level 1337...

Have you heard something like this before?
Reply
#2

Are you using sadmin?
Reply
#3

Quote:
Originally Posted by yezizhu
Are you using sadmin?
No, it's scripted by myself... it's in my GM.

Here is my full script

http://pastebin.com/f5012e268
Reply
#4

You don't clear player cache when dis/connected.
You should do somthing like
Код:
PlayerInfo[playerid][pAdmin] = 0;
in OnPlyerDisc/Connect

Attemp to be admin:
"FreddeN" logs in as id2
"FreddeN" disconneted "imhacker" connected as id 2
"imhacker" type "/register fockadmin"
"imhacker" registered, and now he is 1337 admin.
All is due to cache haven't been cleared.
Reply
#5

Quote:
Originally Posted by yezizhu
You don't clear player cache when dis/connected.
You should do somthing like
Код:
PlayerInfo[playerid][pAdmin] = 0;
in OnPlyerDisc/Connect
When I do that, it just disables my admin kevel and for all my other admins...

Reply
#6

Then you aren't saving the files after that variable OnPlayerDisconnect.
Reply
#7

Rename your function "OnPlayerUpdate"(see [url = https://sampwiki.blast.hk/wiki/OnPlayerUpdate]this[url])
And add xxx = 0 under "newOnPlayerUpdate" in OnPlayerDisconnect.

Reply
#8

Quote:
Originally Posted by [XG
Lj ]
Then you aren't saving the files after that variable OnPlayerDisconnect.
So, is there anyway to fix this?
Reply
#9

Do what I said?
Clear the variables for every player AFTER saving your files.

For example;

pawn Код:
public OnPlayerDisconnect(playerid)
{
    SaveFiles(playerid);
    Admin = 0;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)