26.11.2010, 18:58
Can you list which weapons close the dialog? (If I had to guess it would be the M4, Sawn-Off, Deagle, and Armor).
And for your command:
Also, if you want it to repair the physical damage, like the damage you can see, use RepairVehicle(vehicleid). SetVehicleHealth makes the health of the vehicle to 1000 but if its damaged on the outside it will still look damaged.
And for your command:
pawn Код:
if(strcmp(cmdtext, "/fix", true) == 0)
{
new healt, vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid, healt);
if(healt < 800.0)
{
SetVehicleHealth(vehicleid, 1000);
//RepairVehicle(vehicleid);
}
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "You are not in any vehicle.");
SendClientMessage(playerid, RED, "Your vehicle has been successfully repaired!");
return 1;
}