14.08.2011, 13:06
Can you help me to fix this it has some errors i want to set if player health reaches x then it will apply animation and then start losing health and die but in this time player can do /service ems and /accept death i have example code.
I am also getting this error please fix too
pawn Код:
forward health(playerid);
public health(playerid)
{
if(GetPlayerHealth(playerid,health) <= 1)
{
new Float:health;
SetPlayerHealth(playerid,1.00);
TogglePlayerControllable(playerid,false);
GameTextForPlayer(playerid,"Type /accept to accept your Death");
}
}
public OnPlayerConnect(playerid,blablabla)
{
SetTimerEx("health",1000,true,"i",playerid);
}
pubic onplayercommandtext(playerid, blablabla)
{
if(strcmp("/accept",cmdtext,true) == 0)
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,0xAA3333AA,"You died because you accepted your death");
SetPlayerPos(YOUR CO _ ORDS);
}
}
return 1;
pawn Код:
public function lacks forward declaration (symbol "health")