05.08.2009, 16:07
This is my second attempt. I'm using Fallouts, "Player Damage on Car Damage Code" which I found using the, "SEARCH" button. But, it was in a help topic and the topic was old so I decided not to post anything there and post here instead. This is the error I get.
But, I have no idea... Yeah, I know... And here's the code.
Код:
C:\Users\User\Desktop\SAMP Script #2\pawno\seatbelt.pwn(162) : warning 235: public function lacks forward declaration (symbol "OnPlayerUpdate") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
pawn Код:
public OnPlayerUpdate(playerid) // LINE 162
{
if(IsPlayerInAnyVehicle(playerid) == 1 && Seatbelt[playerid] == 0)
{
new Float:TempCarHealth;
GetVehicleHealth(GetPlayerVehicleID(playerid), TempCarHealth);
new Float:Difference = floatsub(CarHealth[playerid], TempCarHealth);
if((floatcmp(CarHealth[playerid], TempCarHealth) == 1) && (floatcmp(Difference,100.0) == 1))
{
Difference = floatdiv(Difference, 10.0);
new Float:OldHealth;
GetPlayerHealth(playerid, OldHealth);
SetPlayerHealth(playerid, floatsub(OldHealth, Difference));
}
CarHealth[playerid] = TempCarHealth;
}
else
{
CarHealth[playerid] = 0.0;
}
return 1;
}