GiDan's admin system
#1

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
Reply
#2

Do you have register system or some kind of that?
Reply
#3

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

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>
Reply
#5

Yes... i have those
Reply
#6

Agh... can't find the problem?
Reply
#7

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
Reply
#8

check weather there admin rank save on OnPlayerDisconnect?
Reply
#9

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)