Posts: 43
Threads: 16
Joined: Jan 2010
Reputation:
0
existe algum "sensor"(tipo onplayerdeath) que indentifique a mudanзa de vida para menor de um certo valor tipo "quem tiver a vida menor que 10 vai morrer"
OnPlayerHealth Existe?
Posts: 43
Threads: 16
Joined: Jan 2010
Reputation:
0
eu queria um bagulho quando a vida chega se a 10 ele desmaia e tinha que chamar o samu.
Posts: 253
Threads: 20
Joined: Nov 2009
Reputation:
0
Krypton, use [ pawn ] ao invйs de [ code ]
E coloque somente as linhas com erro e os erros
Posts: 66
Threads: 6
Joined: Dec 2009
Reputation:
0
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <cpstream>
#include <Y_Objects>
#define VERDE 0x33AA33AA
forward Coma(playerid);
forward hs(playerid);
public OnPlayerUpdate(playerid)
{
if(GetPlayerHealth(playerid) <= 20.0)
{
new str[128];
new Nome[64];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(str, sizeof(str), "O jogador %s estб morrendo! Liguem para o Samu!!!");
SendClientMessageToAll(VERDE, str);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 0, 1, 1, 1, 1);
TogglePlayerControllable(playerid, 0);
SetTimerEx("Coma",30000, false, "d", playerid);
return 1;
}
}
public Coma(playerid)
{
new cut;
new string[256];
SetPlayerPos(playerid, 1939.5685,-2121.9780,-18.6666);
format(string, sizeof(string), "Hospital: Vocк Estб em Coma.", cut);
SendClientMessage(playerid, VERDE, string);
SetTimerEx("hs",30000, false, "d", playerid);
return 1;
}
public hs(playerid)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}