SA-MP Forums Archive
Tunning money problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tunning money problem (/showthread.php?tid=607802)



Tuning money problem - TheWay - 24.05.2016

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.

Код:
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.


Re: Tunning money problem - TheWay - 24.05.2016

UP..