How to change Rcon to pAdmin
#1

Someone could please help me??

I have script Admin System and no error comes out. But now i don't know how to change. When I logging using /rcon login but nothing happen just like I script. Someone could please help??
Reply
#2

you probably have in script isplayeradmin function but you need to change it to pAdmin regarding how its defined in you admin script if you can give you code pasrt or smth.
Reply
#3

Just remplace
pawn Код:
if(IsPlayerAdmin(playerid))
by
pawn Код:
if(Player[playerid][pAdmin] == 3)
(3 is the level)
Reply
#4

Hello i still remember you , your script is You just go in game type /rcon login [password] to use this command for now
Add this code anywhere in your script
pawn Код:
stock GetPlayerNameEx(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    return Name;
}
Main command :
pawn Код:
CMD:dutyon(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to use godmode");
    SetPlayerHealth(playerid,999999);
    SetPlayerArmour(playerid,999999);
    SetPlayerSkin(playerid,217);
    new Float:x,Float:y,Float:z;
    new Text3D:label = Create3DTextLabel("Admin On Duty!", 0xED0909FF,x,y,z, 40.0, 0, 0);
    Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7);
    GivePlayerWeapon(playerid,38,99999);
    new string[126];
    format(string,sizeof(string),"{FF0000}Adminstrator %s in now in duty!",GetPlayerNameEx(playerid));
    SendClientMessageToAll(-1,string);
    return 1;
}
CMD:dutyoff(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to turn off godmode");
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    new string[126];
    format(string,sizeof(string),"{FF0000}Adminstrator %s off duty!",GetPlayerNameEx(playerid));
    SendClientMessageToAll(-1,string);
    return 1;
}
Now just try to delete this part
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to use godmode");
And delete same part from cmd:dutyoff command
[pawn]
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not adminstrator to use godmode");
It's now working with out /rcon login... any player can turn on/off duty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)