Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function CheckCode(playerid, code[]) {
- if(cache_num_rows() > 0) {
- new
- money = cache_get_field_content_int(0, "money"),
- rp = cache_get_field_content_int(0, "rp"),
- pp = cache_get_field_content_int(0, "pp"),
- string[128];
- mysql_format(SQL,string,128,"UPDATE `tcodes` SET `Activ` = '0',`UsedBy` = '%e' WHERE `Code` = '%e' LIMIT 1",PlayerInfo[playerid][pUsername],code);
- mysql_tquery(SQL,string,"","");
- format(string,128,"Ai primit $%s, %d premium points, %d respect points pentru codul introdus.",FormatNumber(money),pp,rp);
- SendClientMessage(playerid, COLOR_WHITE, string);
- GivePlayerCash(playerid, 0, money);
- PlayerInfo[playerid][pPremiumPoints] += pp;
- PlayerInfo[playerid][pExp] += rp;
- Update(playerid, pCashx);
- Update(playerid, pPremiumPointsx);
- Update(playerid, pRP);
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "Codul introdus este invalid sau a fost folosit!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement