28.11.2014, 08:27
You have set the function, that's okay, but you forgot the callback which you are gonna use to call this callback:
You can use a timer , or you can use OnPlayerUpdate callback:
OnPlayerUpdate is called every second, when player's stats are updated.
EDIT: nvm, late.
You can use a timer , or you can use OnPlayerUpdate callback:
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health < 6)
{
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_WHITE, "[Medic]: Nu mai ai Viata, Contacteaza un Medic(/call 911).");
}
return 1;
EDIT: nvm, late.