Advertisement
Guest User

Untitled

a guest
Dec 16th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. CMD:givegp(playerid, params[])
  2. {
  3. if(PlayerInfo[playerid][pAdmin] >= 2)
  4. {
  5. new gp, id, string[256];
  6.  
  7. if(sscanf(params, "ud", id, gp)) return SendClientMessage(playerid, COLOR_GREY, "{0077ED}Syntax: {FFFFFF}/givegp <Name/Playerid> <ammount>");
  8. {
  9. PlayerInfo[id][pGift] += gp;
  10. GetPlayerName(id, PlayerName, MAX_PLAYER_NAME);
  11. Update(playerid,pGiftx);
  12.  
  13. format(string, sizeof(string), "You have gave %s %d GPoints.", PlayerName, gp);
  14. SendClientMessage(playerid, COLOR_RED, string);
  15.  
  16. GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
  17.  
  18. format(string, sizeof(string), "Administrator %s has gave you %d GPoints.", PlayerName, gp);
  19. SendClientMessage(id, COLOR_RED, string);
  20. }
  21. }
  22. else return SendClientMessage(playerid, COLOR_RED, AdminOnly);
  23. return 1;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement