28.08.2012, 19:22
This is the command and there are no warnings or errors but when I get in game and do the command it doesn't seem to set the players fighting style.
pawn Код:
CMD:setfightstyle(playerid, params[])
{
new targetid, style, string[128];
if(PlayerInfo[playerid][Admin] >=3)
{
if(sscanf(params, "ui", targetid, style)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setfightstyle [id] [styleid]");
if( targetid != INVALID_PLAYER_ID )
{
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);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Only certan levels of Administration have access to this command.");
}
return 1;
}