help[+rep]
#4

pawn Код:
new OnDuty[MAX_PLAYERS];
new OffDutySkin[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
OnDuty[playerid] = 0;
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/duty", true) == 0)
    {
        if(OnDuty[playerid] == 0)
        {
        OffDutySkin[playerid] = GetPlayerSkin(playerid);
        SetPlayerSkin(playerid, 280); //Change 280 to whatever Skin ID you want for a cop.
        SendClientMessage(playerid, 0x00FF00AA, "You are now ON duty.");
        }
        else return SendClientMessage(playerid, 0xFF0000AA, "You are already on duty!");
        return 1;
    }
   
    if(strcmp(cmdtext, "/offduty", true) == 0)
    {
        if(OnDuty[playerid] == 1)
        {
        SetPlayerSkin(playerid, OffDutySkin[playerid]);
        SendClientMessage(playerid, 0x00FF00AA, "You are now OFF duty.");
        }
        else return SendClientMessage(playerid, 0xFF0000AA, "You are already off duty!");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
help[+rep] - by ZBits - 08.07.2012, 10:15
Re: help[+rep] - by Roko_foko - 08.07.2012, 10:20
Re: help[+rep] - by Lordzy - 08.07.2012, 10:21
Re: help[+rep] - by clarencecuzz - 08.07.2012, 10:29
Re: help[+rep] - by ZBits - 08.07.2012, 10:29
Re: help[+rep] - by zombieking - 08.07.2012, 10:35
Re: help[+rep] - by ZBits - 08.07.2012, 10:36

Forum Jump:


Users browsing this thread: 1 Guest(s)