Guest User

Untitled

a guest
May 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. cmd(plac, playerid, params[])
  2. {
  3. new id, amount, str[126];
  4.  
  5. if(sscanf(params, "ud", id, amount)) return SPD(playerid, GUI_NOT_RESPONSE, DIALOG_STYLE_MSGBOX, "Urban RolePlay >> Błąd", "/plac [ID/Nick] [ilość]", "Rozumiem", "");
  6. if(id == INVALID_PLAYER_ID) return SCM(playerid, SZARY, "Nie ma takiego gracza!");
  7. if(amount >= PlayerData[playerid][pMoney]) return SendClientMessage(playerid, SZARY, "Nie posiadasz tyle gotówki");
  8. if(!IsPlayerNearPlayer(playerid, id, 5.0)) return SendClientMessage(playerid, SZARY, "Gracz nie znajduje się w pobliżu.");
  9.  
  10. PlayerData[id][pMoney] += amount;
  11. format(str, sizeof str, "Otrzymałeś %i pieniędzy od %s", amount, PlayerData[playerid][pNick]);
  12. SCM(id, COLOR_LIGHTBLUE, str);
  13.  
  14. PlayerData[playerid][pMoney] -= amount;
  15. format(str, sizeof str, "Dałeś %i pieniędzy dla %s", amount, PlayerData[id][pNick]);
  16. SCM(playerid, COLOR_LIGHTBLUE, str);
  17.  
  18. format(str, sizeof str, "Gracz %s wyciąga trochę pieniędzy z portfela po czym przekazuje je %s", PlayerData[playerid][pNick], PlayerData[id][pNick]);
  19. SCME(14.0, playerid, str, COLOR_PURPLE);
  20.  
  21. ZapiszGracza(playerid);
  22. ZapiszGracza(id);
  23.  
  24. return 1;
  25. }
Add Comment
Please, Sign In to add comment