Jump to content
  • 0

Nu se salveaza vip la masini


Question

2 answers to this question

Recommended Posts

  • 0
Posted
3 hours ago, Kiran said:

ai facut update sa se salveze in baza de date?

        case DIALOG_BUYVIPCAR: {
            if(response) {
                if(PlayerInfo[playerid][pPremiumPoints] <= 99) return ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points.\nNu ai suficiente puncte premium.", "Ok", "");
                new idcar = SelectedCar[playerid];
                new str2[256], strings[128], stringss[128];
                if(PlayerInfo[playerid][pCarVIP][idcar] == 1) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "Acest vehicul este deja VIP.");
                if(PlayerInfo[playerid][pCarModel][idcar] != 411 && PlayerInfo[playerid][pCarModel][idcar] != 541 && PlayerInfo[playerid][pCarModel][idcar] != 560) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "Momentan doar vehiculele Infernus, Bullet si Sultan pot fi upgradate.");
                PlayerInfo[playerid][pPremiumPoints] -= 100;
                PlayerInfo[playerid][pCarVIP][idcar] = 1;
                SendClientMessage(playerid, COLOR_YELLOW, "You paid 100 premium points to make this vehicle VIP.");
                format(strings, sizeof(strings), "%s[user:%d] paid 100 premium points to make his car VIP.", PlayerInfo[playerid][pNormalName], PlayerInfo[playerid][pSQLID]);
                ABroadCast(COLOR_YELLOW, strings, 6);
                mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `PremiumPoints`='%d' WHERE `name`='%s'", PlayerInfo[playerid][pPremiumPoints], PlayerInfo[playerid][pNormalName]);
                mysql_tquery(SQL,str2,"","");
                mysql_format(SQL,str2,sizeof(str2),"UPDATE cars SET `VIP`='1' WHERE `ID`='%d'", PlayerInfo[playerid][pCar][idcar]);
                mysql_tquery(SQL,str2,"","");
                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,"","");

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.