Hyland

[FS] Fight Style

Nov 27th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. CMD:setfightstyle(playerid, params[])
  2. {
  3. if(IsPlayerAdmin(playerid))
  4. {
  5. new string[128], giveplayerid, fightstyle;
  6. if(sscanf(params, "ud", giveplayerid, fightstyle))
  7. {
  8. SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setfightstyle [playerid] [fightstyle]");
  9. SendClientMessageEx(playerid, COLOR_GRAD2, "Available fighting styles: 4, 5, 6, 7, 15, 26.");
  10. return 1;
  11. }
  12.  
  13. if(fightstyle > 3 && fightstyle < 8 || fightstyle == 15 || fightstyle == 26)
  14. {
  15. format(string, sizeof(string), " Your fighting style has been changed to %d.", fightstyle);
  16. SendClientMessageEx(giveplayerid,COLOR_YELLOW,string);
  17. format(string, sizeof(string), " You have changed %s's fighting style to %d.", GetPlayerNameEx(giveplayerid), fightstyle);
  18. SendClientMessageEx(playerid,COLOR_YELLOW,string);
  19. SetPlayerFightingStyle(giveplayerid, fightstyle);
  20. PlayerInfo[playerid][pFightStyle] = fightstyle;
  21. return 1;
  22. }
  23. }
  24. else
  25. {
  26. SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
  27. }
  28. return 1;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment