SA-MP Forums Archive
Admin system :( - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Admin system :( (/showthread.php?tid=506315)



Admin system :( - James Coral - 12.04.2014

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


Re: Admin system :( - bool - 12.04.2014

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!


Re: Admin system :( - Sascha - 12.04.2014

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.


Re: Admin system :( - James Coral - 12.04.2014

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


Re: Admin system :( - Sascha - 12.04.2014

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



Re: Admin system :( - James Coral - 12.04.2014

but that sets even Admins to level 0 :P


Re: Admin system :( - bool - 12.04.2014

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.


Re: Admin system :( - James Coral - 12.04.2014

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