06.03.2014, 22:45
I want all the code will be only if there is any one of 10 hp he will be in / crack
my codes:
my codes:
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define col_grey 0xADADADFF
new pDied[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
// Checking for their variable..
if(pDied[playerid] == 0)
{
// Spawning at ASGH in Los Santos...
pDied[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:x, Float:y, Float:z;
// Resetting their position:
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z);
SetPlayerVirtualWorld(playerid, 0);
// Freezing them in death, aka not allowing them to respawn:
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth1", 4.1, 0, 1, 1, 1, 1, 1);
SetPlayerVirtualWorld(playerid, 0);
// Informing them and activating timer:
SetTimerEx("DeathTimer", 99000, false, "i", playerid);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}