13.01.2013, 12:27
(
Последний раз редактировалось jakejohnsonusa; 13.01.2013 в 19:23.
)
I get "error 025: function heading differs from prototype" on the following code. Whats wrong? And how can I fix it?
Code: (Error on line OnPlayerTakeDamage)
Thanks in advance!
Code: (Error on line OnPlayerTakeDamage)
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)//Called when a player takes damage
{
new Float:hp;
GetPlayerHealth(playerid, hp); //Get the player's health
if(hp < 40.0) //If their health is lower than 40
{
if(Dying[playerid] == 0) //If they are not already dying (We don't want to set a timer twice)
{
SetTimerEx("DeathTimer", 3000, true, "i", playerid); //Set a timer every 3 seconds to go off (repeating)
Dying[playerid] = 1; //They are now dying
SendClientMessage(playerid, 0xFF0000FF, "You are injured and are losing health slowly. You need a medic!"); //Change this message however you want, or remove it, the choice is yours
}
}
return 1;
}
Thanks in advance!