24.04.2012, 18:05
Try this:
Best regards!
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]");
GetPlayerName(playerid,pname,sizeof(pname));
new pstring[128];
format(pstring,sizeof(pstring),"You have set your vehicle health to %f",VehicleHealth);
SetVehicleHealth(vehicleid,VehicleHealth);
}
return 1;
}