/aduty command
#1

.......
Reply
#2

Which command processor are you using?
Reply
#3

here is what you need i think. If there is some mistake dont blame me iam a bit sleepy atm. :P

pawn Код:
// put this at the top of script

new OnDuty[MAX_PLAYERS];

//The cmd is using ZCMD.

CMD:aduty(playerid,params[])
{
    // if the player isnt a rcon admin then this message will be sent to him.
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Invalid Command.");
   
    if(OnDuty[playerid] == 0)
    {      
        SetPlayerSkin(playerid,217);
        SetPlayerHealth(playerid,100000);
        SetPlayerColor(playerid, 0x01FCFFFF);
        OnDuty[playerid] = 1;
    }
    else
    {
        SetPlayerSkin(playerid,23);
        SetPlayerHealth(playerid,100);
        SetPlayerColor(playerid 0xFFFFFFFF);
        OnDuty[playerid] = 0;
    }
    return 1;
}
didnt tested it hopefully it will work.
Reply
#4

I edited Marven's codes to a better one:

PHP код:
// put this at the top of script

new OnDuty[MAX_PLAYERS];

//The cmd is using ZCMD.

CMD:aduty(playerid,params[])
{
    new 
skin GetPlayerSkin(playerid);
    
// if the player isnt a rcon admin then this message will be sent to him.
    
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Invalid Command.");

    if(
OnDuty[playerid] == 0)
    {
        
SetPlayerSkin(playerid,217);
        
SetPlayerHealth(playerid,100000);
        
SetPlayerColor(playerid0x01FCFFFF);
        
OnDuty[playerid] = 1;
    }
    else
    {
        
SetPlayerSkin(playerid,skin);
        
SetPlayerHealth(playerid,100);
        
SetPlayerColor(playerid 0xFFFFFFFF);
        
OnDuty[playerid] = 0;
    }
    return 
1;

There you go.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)