23.04.2013, 03:58
HI!
Can someone tell me how to make if vehicle get 990 health it will avtomaticly repair.
Can someone tell me how to make if vehicle get 990 health it will avtomaticly repair.
if(IsPlayerInAnyVehicle(playerid))
{
new Float:h; //health
new veh; //vehicle
veh = GetPlayerVehicleID(playerid)
GetVehicleHealth(veh,h);
if(h <=990) RepairVehicle(veh);
}
Line-13:error 001: expected token: ";", but found "-identifier-"
GetVehicleHealth(veh,h);
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:h; //health
new veh; //vehicle
veh = GetPlayerVehicleID(playerid)
GetVehicleHealth(veh,h);
if(h <=990) RepairVehicle(veh);
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:h; //health
new veh; //vehicle
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh,h);
if(h <=990) RepairVehicle(veh);
}
return 1;
}
Код:
Line-13:error 001: expected token: ";", but found "-identifier-" Line 13: PHP код:
PHP код:
|