Admin system :(
#1

Problem is that if any new player registers it gives him Admin Level 5
it should be 0
Reply
#2

it gives him level 5 right away or does it give him level 5 when he disconnects and logs in again?

SHOW US SOME CODE!
Reply
#3

the actual problem is that you did not read this: http://forum.sa-mp.com/announcement.php?f=12
and the other problem is, that none of us could even help you if he was willing to, as long as you don't give any more information and post your code lines.
Reply
#4

pawn Код:
new INI:file = INI_Open(Path(playerid)); //will open their file
        INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data"
        INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]); //If you've set his/her admin level, then his/her admin level will be saved inside of his/her account
        INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);//As explained above
        INI_WriteInt(file,"Money",GetPlayerMoney(playerid));//We will save his money inside of his account
        INI_WriteInt(file,"Scores",GetPlayerScore(playerid));//We will save his score inside of his account
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);//As explained above
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
        INI_WriteInt(file,"Muted",pInfo[playerid][Muted]);
        INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);//As explained above
        INI_Close(file);
heres my registrering code
Reply
#5

try
pawn Код:
public OnPlayerConnect(playerid)
{
    pInfo[playerid][AdminLevel] = 0;
    return 1;
}
Reply
#6

but that sets even Admins to level 0 :P
Reply
#7

It doesn't set everyone's admin level to 0 so long as you are loading them at some point later on.

I personally, would put it under OnPlayerDisconnect.
Reply
#8

Quote:
Originally Posted by bool
Посмотреть сообщение
It doesn't set everyone's admin level to 0 so long as you are loading them at some point later on.

I personally, would put it under OnPlayerDisconnect.
But what happens when i but that code upper that register code , then it should save player stats
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)