20.11.2015, 17:25
Hi, i want to make that when i repair a car in Pay'n spray, it will cost $100 per destroy the vehicle has, but i have made this code, but it doesnt Work? 

pawn Код:
public OnVehicleRespray( playerid, vehicleid, color1, color2)
{
new veh;
veh = VehicleOwned[vehicleid];
if(CarInfo[veh][cDestroys] != 0)
{
new string[128];
new amount = CarInfo[veh][cDestroys];
new price = amount * 100;
GiveMoney(playerid, -price);
format(string, sizeof(string), "This %s has %d Destroys, and therefore cost $%d to repair. ",vehName[GetVehicleModel(vehicleid)-400],amount,price);
SendClientMessage(playerid, COLOR_GREY,string);
}
return 1;
}