Guest User

Untitled

a guest
Jun 15th, 2014
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. if(strcmp(cmd, "/givecash", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. tmp = strtok(cmdtext, idx);
  6. if(!strlen(tmp))
  7. {
  8. SendClientMessage(playerid, COLOR_GREY, "USAGE: /givecash [player id/name] [money]");
  9. return 1;
  10. }
  11. new playa;
  12. new money;
  13. playa = ReturnUser(tmp);
  14. tmp = strtok(cmdtext, idx);
  15. money = strval(tmp);
  16. if (PlayerInfo[playerid][pAdmin] >= 5)
  17. {
  18. if(IsPlayerConnected(playa))
  19. {
  20. if(playa != INVALID_PLAYER_ID)
  21. {
  22. GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  23. GetPlayerName(playerid, sendername, sizeof(sendername));
  24. ResetPlayerMoney(playa);
  25. ConsumingMoney[playa] = 1;
  26. GivePlayerMoney(playa, money);
  27. }
  28. }
  29. }
  30. else
  31. {
  32. SendClientMessage(playerid, COLOR_GREY, "You are not a admin!");
  33. }
  34. }
  35. return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment