Setting Fighting Style.
#3

pawn Код:
CMD:setfightstyle(playerid, params[])
{
    new targetid, style, string[128];
    if(PlayerInfo[playerid][Admin] >=3)
    {
        if(sscanf(params, "ud", targetid, style)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setfightstyle [id] [4, 5, 6, 7, 15, 26]");
        if( targetid != INVALID_PLAYER_ID )
        {
            if(style > 3 && style < 8 || style == 15 || style == 26)
            {
                SetPlayerFightingStyle(targetid, style);
                format(string, sizeof(string),"Administrator %s has set your fighting style to id %d",pName(playerid), style);
                SendClientMessage(targetid,COLOR_RED,string);
                format(string, sizeof(string),"You have set %s's fighting style to id %d",pName(targetid), style);
                SendClientMessage(playerid,COLOR_RED,string);
                SetPlayerFightingStyle(giveplayerid, style);
            }  
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Only certan levels of Administration have access to this command.");
    }
    return 1;
}
Reply


Messages In This Thread
Setting Fighting Style. - by nogh445 - 28.08.2012, 19:22
Re: Setting Fighting Style. - by ThePhenix - 28.08.2012, 19:25
Re: Setting Fighting Style. - by RenSoprano - 28.08.2012, 19:30

Forum Jump:


Users browsing this thread: 2 Guest(s)