|
I know but for use SendDeathMessage i need to stay in the OnPlayerDeath, right?
But my script of death system isn't in the OnPlayerDeath |
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid,death_pos[playerid][0],death_pos[playerid][1],death_pos[playerid][2]);
SetPlayerFacingAngle(playerid,death_pos[playerid][3]);
SetPlayerInterior(playerid,death_stats[playerid][0]);
SetPlayerVirtualWorld(playerid,death_stats[playerid][1]);
SetPlayerSkin(playerid,death_stats[playerid][2]);
GameTextForPlayer(playerid,"~r~Ferito!",5000,5);
SetTimerEx("SetDeathAnim", 1500, false, "i", playerid);
SendClientMessage(playerid,COLOR_LIGHTRED,"Sei stato ferito. Perderai sempre piщ HP almeno che un medico non arrivi.");
SendClientMessage(playerid,COLOR_LIGHTRED,"Puoi usare /accettamorte 2 minuti. Per fermare l'attesa.");
SetPlayerHealth(playerid,50);
death_hploss[playerid] = 60;
death_cooldown[playerid] = 120;
new rand = random(5)+1;
switch(rand)
{
case 1: ApplyAnimation(playerid, "ped", "FLOOR_hit", 4.0, 0, 1, 1, 1, -1);
case 2: ApplyAnimation(playerid, "ped", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, -1);
case 3: ApplyAnimation(playerid, "ped", "KO_shot_front", 4.0, 0, 1, 1, 1, -1);
case 4: ApplyAnimation(playerid, "ped", "KO_shot_stom", 4.0, 0, 1, 1, 1, -1);
case 5: ApplyAnimation(playerid, "ped", "BIKE_fall_off", 4.0, 0, 1, 1, 1, -1);
default: ApplyAnimation(playerid,"WUZI","CS_Dead_Guy",4.1,1,1,1,1,1,1);