Advertisement
Guest User

Untitled

a guest
Mar 25th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. function CheckCode(playerid, code[]) {
  2. if(cache_num_rows() > 0) {
  3. new
  4. money = cache_get_field_content_int(0, "money"),
  5. rp = cache_get_field_content_int(0, "rp"),
  6. pp = cache_get_field_content_int(0, "pp"),
  7. string[128];
  8. mysql_format(SQL,string,128,"UPDATE `tcodes` SET `Activ` = '0',`UsedBy` = '%e' WHERE `Code` = '%e' LIMIT 1",PlayerInfo[playerid][pUsername],code);
  9. mysql_tquery(SQL,string,"","");
  10. format(string,128,"Ai primit $%s, %d premium points, %d respect points pentru codul introdus.",FormatNumber(money),pp,rp);
  11. SendClientMessage(playerid, COLOR_WHITE, string);
  12. GivePlayerCash(playerid, 0, money);
  13. PlayerInfo[playerid][pPremiumPoints] += pp;
  14. PlayerInfo[playerid][pExp] += rp;
  15. Update(playerid, pCashx);
  16. Update(playerid, pPremiumPointsx);
  17. Update(playerid, pRP);
  18. return 1;
  19. }
  20. else return SendClientMessage(playerid, COLOR_WHITE, "Codul introdus este invalid sau a fost folosit!");
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement