21.11.2014, 18:55
Hello. I've tried to make a function, include, when a player crashes vehicle. I tried, if his car's health it's less than 1000 then will get a message. I tried this function for a DMV Exam on my server. What's wrong here?
pawn Код:
forward OnPlayerCrashVehicle(playerid);
stock Health(playerid)
{
new vehicle;
new Float:Health;
vehicle = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicle, health);
if(health > 1000) return CallLocalFunction("OnPlayerCrashVehicle", "i", playerid);
}
public OnPlayerCrashVehicle(playerid)
{
SendClientMessage(playerid, -1, "You crashed the vehicle, so you lost DMV Exam. Please try again !");
return 1;
}