Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. if(strcmp(cmd, "/weapons", true) == 0 || strcmp(cmd, "/checkguns", true) == 0)
  2. {
  3. if (PlayerInfo[playerid][pAdmin] < 3)
  4. {
  5. SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this comand ");
  6. return 1;
  7. }
  8. tmp = strtok(cmdtext,idx);
  9. if (!strlen(tmp))
  10. {
  11. SendClientMessage(playerid, COLOR_GREY, "USAGE: /weapons [playerid/playerName]");
  12. return 1;
  13. }
  14. giveplayerid = ReturnUser(tmp);
  15. if (giveplayerid == INVALID_PLAYER_ID)
  16. {
  17. SendClientMessage(playerid, COLOR_GREY, "That player is offline");
  18. return 1;
  19. }
  20. new x_wep,sammo;
  21. GetPlayerName(playerid,sendername,sizeof(sendername));
  22. GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
  23. format(string, sizeof(string), "%s has checked the weapons to %s",sendername,giveplayer);
  24. ABroadCast(COLOR_LIGHTRED,string,1);
  25.  
  26. for (new i=0; i<9; i++)
  27. {
  28. GetPlayerWeaponData(giveplayerid, i, x_wep,sammo);
  29. if(x_wep != 0)
  30. {
  31. format(string, sizeof(string), "%d: %s (%d)", i, x_wep,sammo);
  32. SendClientMessage(playerid, COLOR_GRAD1, string);
  33. }
  34. }
  35. return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement