05.06.2011, 13:17
All this is, is because new float: isn't a capital F. It should be new Float:
Also, wouldn't it be better to use a timer, instead of OnPlayerUpdate for this? I mean the amount of times it gets called, it would cause lag if you get a lot of players.
Stigg: No. GetPlayerHealth has 2 parameters. https://sampwiki.blast.hk/wiki/GetPlayerHealth
pawn Код:
#include <a_samp>
#define COLOR_RED 0xFF0000FF
public OnPlayerUpdate(playerid){
new Float:Phealth;
GetPlayerHealth(playerid, Phealth);
if(Phealth < 20){
ApplyAnimation(playerid,"CRACK","crckidle1",4.1,1, 0,0,0,1);
SendClientMessage(playerid, COLOR_RED, "You are dieing, You need a medic Please wait for a medic");
}
}
Stigg: No. GetPlayerHealth has 2 parameters. https://sampwiki.blast.hk/wiki/GetPlayerHealth