RCON Cmd
#5

Conver to ZCMD.

PHP код:
CMD:setlevel(playeridparams[])
{
    new 
string[144lookupidlevel;
    if(
sscanf(params"ui"lookupidlevel)) return print(""#COL_RED"Usage: /rcon setlevel (player: id/name) (level: 0-2)");
    
if(!IsValidAdminLevel(level)) return print(""#COL_RED"You have entered an invalid admin level.");
    
if(!IsPlayerConnected(lookupid)) return print(""#COL_RED"That player isn't connected to the server.");
    
aUserInfo[lookupid][user_info_admin_level] = level;
    if(
IsPlayerOnDuty(lookupid))
    {
        
SetPlayerSkin(lookupidpBeforeOnDutyInfo[lookupid][0]);
        
SetPlayerHealth(lookupid100.0);
        
SetPlayerColor(lookupidpBeforeOnDutyInfo[lookupid][1]);

        
psOnDuty[lookupid] = false;
    }
    
format(stringsizeof(string), "{%06x}You have set %s(%d) admin level to %d."GetPlayerAdminLevelColor(lookupid) >>> 8AddPertinence(ReturnPlayerName(lookupid)), lookupidlevel);
    print(string);

    
format(stringsizeof(string), "Your admin level has been set to %d."level);
    
SendClientMessage(lookupidGetPlayerAdminLevelColor(lookupid), string);

    new 
log[144];
    
format(logsizeof(log), "%s(%d) admin level has been set to %d."AddPertinence(ReturnPlayerName(lookupid)), lookupidlevel);
    
RegisterLog("scriptfiles/Admin Log/rconlog"log);

Now you can decide to take it on rcon or admin level:

PHP код:
IsPlayerAdmin(playerid
or

PHP код:
if(aUserInfo[lookupid][user_info_admin_level] == ) return //scm no admin 
Reply


Messages In This Thread
RCON Cmd - by Sting. - 07.01.2018, 09:57
Re: RCON Cmd - by jop9888 - 07.01.2018, 10:48
Re: RCON Cmd - by RowdyrideR - 07.01.2018, 11:58
Re: RCON Cmd - by Sting. - 07.01.2018, 12:11
Re: RCON Cmd - by jasperschellekens - 07.01.2018, 14:01
Re: RCON Cmd - by Sting. - 07.01.2018, 14:35
Re: RCON Cmd - by RowdyrideR - 07.01.2018, 15:10
Re: RCON Cmd - by Sting. - 07.01.2018, 15:25
Re: RCON Cmd - by RowdyrideR - 07.01.2018, 22:32
Re: RCON Cmd - by Sew_Sumi - 08.01.2018, 01:46

Forum Jump:


Users browsing this thread: 3 Guest(s)