28.06.2009, 08:58
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK)
{
if (PlayerToPoint(0.5, playerid, 1778.5148,-1575.8615,17.4416))
{
#define newhealth 25
new Float:oldhealth;
GetPlayerHealth(playerid,oldhealth);
SetPlayerHealth(playerid,oldhealth + newhealth);
}
else
{
GetPlayerHealth(playerid, 100); // line 23
SendClientMessage(playerid, 0xFF0000FF, " Your health is full");
}
}
return 1;
}
Iam getting error on line (23) : error 035: argument type mismatch (argument 2)
I want that line as when the Player's health is 100 then it tells him that his health is full, and i need to set timer so after 5 seconds he can press F again so he can heal again until he reach 100 health, after that, he cannot use it again unless he loses health..
If you can help me, then please do..