Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:setfightstyle(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128], giveplayerid, fightstyle;
- if(sscanf(params, "ud", giveplayerid, fightstyle))
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setfightstyle [playerid] [fightstyle]");
- SendClientMessageEx(playerid, COLOR_GRAD2, "Available fighting styles: 4, 5, 6, 7, 15, 26.");
- return 1;
- }
- if(fightstyle > 3 && fightstyle < 8 || fightstyle == 15 || fightstyle == 26)
- {
- format(string, sizeof(string), " Your fighting style has been changed to %d.", fightstyle);
- SendClientMessageEx(giveplayerid,COLOR_YELLOW,string);
- format(string, sizeof(string), " You have changed %s's fighting style to %d.", GetPlayerNameEx(giveplayerid), fightstyle);
- SendClientMessageEx(playerid,COLOR_YELLOW,string);
- SetPlayerFightingStyle(giveplayerid, fightstyle);
- PlayerInfo[playerid][pFightStyle] = fightstyle;
- return 1;
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment