24.04.2012, 19:13
I am trying to make it so you can set the vehicles health level
But when i put a number in the health bit it says "You have set your vehicle health to (the number) but when i drive around the car still gets damaged ( bonet coming off doors coming off ) but it never blows up even if i put the number to 1
Thank You
Please Help Me Please
pawn Код:
CMD:setvehiclehealth(playerid, params[])
{
if(PlayerData[ID][AdminLevel] >= 1)
{
new VehicleHealth;
new vehicleid = GetPlayerVehicleID(playerid);
if(sscanf(params, "f", VehicleHealth)) return SendClientMessage(playerid, COLOR_GREEN, "/setvehiclehealth [Health]");
new pstring[128];
format(pstring,sizeof(pstring),"You have set your vehicle health to %f",VehicleHealth);
SendClientMessage(playerid, COLOR_GREEN, pstring);
SetVehicleHealth(vehicleid,VehicleHealth);
}
return 1;
}
Thank You
Please Help Me Please