Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(listitem == 19)
- {
- if(PlayerInfo[playerid][pPremiumPoints] <= 19)
- {
- ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points to do this.", "Close", "");
- return 1;
- }
- PlayerInfo[playerid][pPremiumPoints] -= 20;
- Update(playerid, pPremiumPointsx);
- PlayerInfo[playerid][pCase] += 5;
- new str2[300],strings[200],name[30],stringss[200];
- mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `PremiumPoints`='%d',`Case`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pPremiumPoints],PlayerInfo[playerid][pCase],PlayerInfo[playerid][pNormalName]);
- mysql_tquery(SQL,str2,"","");
- SendClientMessage(playerid, COLOR_YELLOW, "You have bought 5 cases (-20 Drawn points)");
- GetPlayerName(playerid, name, sizeof(name));
- format(strings, sizeof(strings), "/shop: %s bought 5 cases",name);
- ABroadCast(COLOR_YELLOW,strings,7);
- mysql_real_escape_string(strings, stringss);
- mysql_format(SQL,str2,sizeof(str2), "INSERT INTO `shop_logs` (`playerid`,`Message`) VALUES('%d','%s')",PlayerInfo[playerid][pSQLID],stringss);
- mysql_tquery(SQL,str2,"","");
- }
- if(listitem == 20)
- {
- if(PlayerInfo[playerid][pPremiumPoints] <= 14)
- {
- ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points to do this.", "Close", "");
- return 1;
- }
- PlayerInfo[playerid][pPremiumPoints] -= 15;
- Update(playerid, pPremiumPointsx);
- PlayerInfo[playerid][pCKey] += 5;
- new str2[300],strings[200],name[30],stringss[200];
- mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `PremiumPoints`='%d',`CKey`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pPremiumPoints],PlayerInfo[playerid][pCKey],PlayerInfo[playerid][pNormalName]);
- mysql_tquery(SQL,str2,"","");
- SendClientMessage(playerid, COLOR_YELLOW, "You have bought 5 keys (-15 Drawn points)");
- GetPlayerName(playerid, name, sizeof(name));
- format(strings, sizeof(strings), "/shop: %s bought 5 keys",name);
- ABroadCast(COLOR_YELLOW,strings,7);
- mysql_real_escape_string(strings, stringss);
- mysql_format(SQL,str2,sizeof(str2), "INSERT INTO `shop_logs` (`playerid`,`Message`) VALUES('%d','%s')",PlayerInfo[playerid][pSQLID],stringss);
- mysql_tquery(SQL,str2,"","");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement