Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Tunning money problem

$
0
0
When somebody is in a tuning shop, the shop is taking their money even if they look at the mod an not apply it on their car.

Code:

public OnVehicleRespray(playerid, vehicleid, color1, color2) {
        #if defined DEBUG
            printf("[debug] OnVehicleRespray(%d, %d, %d, %d)", playerid, vehicleid, color1, color2);
        #endif
       
        SetPVarInt(playerid, "pC", 1);
        GivePlayerCash(playerid, -100, "\0");
        GivePlayerCash(playerid, -businessVariables[15][bEnterPrice], "\0");
        businessVariables[15][bVault] += businessVariables[15][bEnterPrice];
        if( V_DATA[ vehicleid ][ vSQLID ] != 0 ){
                V_DATA[ vehicleid ][ vColor ][ 0 ] = color1;
                V_DATA[ vehicleid ][ vColor ][ 1 ] = color2;
                SaveVehicle( vehicleid );
        }
        return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid) {
        #if defined DEBUG
            printf("[debug] OnVehiclePaintjob(%d, %d, %d)", playerid, vehicleid, paintjobid);
        #endif
       
        SetPVarInt(playerid, "pC", 1);
        GivePlayerCash(playerid, -businessVariables[15][bEnterPrice], "OVP:Paintjob");
        businessVariables[15][bVault] += businessVariables[15][bEnterPrice];
        if( V_DATA[ vehicleid ][ vSQLID ] != 0 ){
            V_DATA[ vehicleid ][ vPaintjob ] = paintjobid;
            SaveVehicle( vehicleid );
        }
        return 1;
}

And is not from something above.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>