Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Admin Duty

$
0
0
Code:

CMD:adminduty(playerid)
{
    if(PlayerInfo[playerid][Level] >=1 || IsPlayerAdmin(playerid))
    {
        if (adminDuty[playerid] == 0)
        {
            new string[128];
            SetPlayerHealth(playerid,999999);
            SetPlayerColor(playerid,COLOUR_BLUE);
            SetPlayerSkin(playerid,294);
            format(string,sizeof(string), "%s is now on Duty!",GetPlayerName(playerid));
            SendClientMessageToAll(COLOUR_BLUE,string);
            SendClientMessage(playerid,COLOUR_BLUE,"You are now on duty!");
            adminDuty[playerid] = 1;
        }
        else if (adminDuty[playerid] == 1)
        {
            new string[128];
            SetPlayerHealth(playerid,100);
            format(string,sizeof(string)," %s is now off Duty!",GetPlayerName(playerid));
            SendClientMessageToAll(COLOUR_BLUE,string);
            SendClientMessage(playerid, COLOUR_BLUE,"You are now off duty!");
            adminDuty[playerid] = 0;
        }
    }
    else
        SendClientMessage(playerid,COLOUR_BLUE,"You're not an admin!");
    return 1;
}

stock GetPlayerNameEx(playerid) //This is stock i made to make Getting players name easier
{
        new Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
        return Name;
}

copy from this

http://forum.sa-mp.com/showthread.php?t=476571

help me

PHP Code:

C:\Users\aiman\Desktop\Project\ADADA\LTFDM.pwn(20510) : warning 202number of arguments does not match definition
C
:\Users\aiman\Desktop\Project\ADADA\LTFDM.pwn(20510) : warning 202number of arguments does not match definition
C
:\Users\aiman\Desktop\Project\ADADA\LTFDM.pwn(20519) : warning 202number of arguments does not match definition
C
:\Users\aiman\Desktop\Project\ADADA\LTFDM.pwn(20519) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase


4 Warnings



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>