SA-MP Forums Archive
GiDan's 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: GiDan's admin system (/showthread.php?tid=556349)



GiDan's admin system - Primard - 10.01.2015

Each time an admin re-logs, they are not an admin when they log in, so how can I edit the script so that the admins will always be an admin each time they log in and I don't have to make them admin every time they log in.
Here is the thread: https://sampforum.blast.hk/showthread.php?tid=303794


Re: GiDan's admin system - iCurse - 10.01.2015

Do you have register system or some kind of that?


Re: GiDan's admin system - Primard - 10.01.2015

yea, there is a register system inside the fs. And the fs is never modified


Re: GiDan's admin system - iCurse - 10.01.2015

Wait, i'll try the system. And see what's the problem.

EDIT/ADD: Do you event have these?

Код:
#include <a_samp>
#include <foreach>
#include <sscanf2>
#include <YSI/y_ini>
#include <YSI\y_commands>



Re: GiDan's admin system - Primard - 10.01.2015

Yes... i have those


Re: GiDan's admin system - Primard - 10.01.2015

Agh... can't find the problem?


Re: GiDan's admin system - Primard - 11.01.2015

Can someone help identify the problem as to why I need to make the players who are admins admin when they re-log in? Thank you


Re: GiDan's admin system - Arxalan - 11.01.2015

check weather there admin rank save on OnPlayerDisconnect?


Re: GiDan's admin system - Primard - 12.01.2015

No, here is the line in on OnPlayerDisconnect:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new
        pFile[35];

    format(pFile, 35, Player_File, GetName(playerid));
   
    new
    INI:UserFile = INI_Open(pFile);
    INI_WriteInt(UserFile, "Admin", P_Data[playerid][pAdmin]);
    INI_WriteInt(UserFile, "Money", GetPlayerMoney(playerid));
    INI_WriteInt(UserFile, "Score", GetPlayerScore(playerid));
    INI_WriteInt(UserFile, "Skin", P_Data[playerid][pSkin]);
    INI_WriteInt(UserFile, "Warn", P_Data[playerid][pWarn]);
    INI_WriteInt(UserFile, "VIP", P_Data[playerid][VIP]);

    INI_Close(UserFile);
    return 1;
}