SA-MP Forums Archive
how to not ClearAnimations - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how to not ClearAnimations (/showthread.php?tid=658040)



how to not ClearAnimations - sonn51280 - 21.08.2018

Video :
Quote:
yo utube.com/watch?v=n3gKpx0eyvw&feature
Quote:

if(GetPVarInt(i, "EMSAttempt") != 0)
{

new Float:health;
new string[128];
GetPlayerHealth(i,health);
SetPlayerHealth(i, health-1);
if(GetPVarInt(i, "EMSAttempt") == -1)
{
if(GetPlayerAnimationIndex(i) != 746) ClearAnimations(i), ApplyAnimation(i, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
if(!GetPVarType(i, "StreamPrep") && !IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")) && !GetPVarInt(i, "OnStretcher"))
{
SendClientMessageEx(i, COLOR_WHITE, "You fell unconscious, you were immediately sent to the hospital.");
KillEMSQueue(i);
SpawnPlayer(i);
}
GameTextForPlayer(i, "~r~Bi Thuong~n~~w~/dichvu capcuu Hoac /chapnhan chet", 5000, 3);
format(string, sizeof(string), "(( Nguoi choi dang bi thuong. ))");
SetPlayerChatBubble(i,string,COLOR_LIGHTRED,50.0,1 0000);
}
if(GetPVarInt(i, "EMSAttempt") == 1)
{
if(GetPlayerAnimationIndex(i) != 746) ClearAnimations(i), ApplyAnimation(i, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
if(!GetPVarType(i, "StreamPrep") && !IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")) && !GetPVarInt(i, "OnStretcher"))
{
SendClientMessageEx(i, COLOR_WHITE, "You fell unconscious, you were immediately sent to the hospital.");
KillEMSQueue(i);
SpawnPlayer(i);
}
GameTextForPlayer(i, "~r~Injured~n~~w~Waiting for EMS to Arrive...", 5000, 3);
format(string, sizeof(string), "(( Nguoi choi dang bi thuong. ))");
SetPlayerChatBubble(i,string,COLOR_LIGHTRED,50.0,1 0000);
}

Quote:

forward SendEMSQueue(playerid,type);
public SendEMSQueue(playerid,type)
{
#if defined zombiemode
if(zombieevent == 1 && GetPVarType(playerid, "pIsZombie"))
{
KillEMSQueue(playerid);
SpawnPlayer(playerid);
return 1;
}
if(zombieevent == 1 && GetPVarType(playerid, "pZombieBit"))
{
KillEMSQueue(playerid);
ClearAnimations(playerid);
MakeZombie(playerid);
return 1;
}
#endif
switch (type)
{
case 1:
{
Streamer_UpdateEx(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid,"MedicVW"));
SetPlayerInterior(playerid, GetPVarInt(playerid,"MedicInt"));

SetPVarInt(playerid, "EMSAttempt", -1);

if(GetPlayerInterior(playerid) > 0) Player_StreamPrep(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"), FREEZE_TIME);
GameTextForPlayer(playerid, "~r~Bi Thuong~n~~w~/dichvu capcuu Hoac /chapnhan chet", 5000, 3);
ClearAnimations(playerid);
ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 0, 1, 1, 0, 0, 1);
SetPlayerHealth(playerid, 100);
RemoveArmor(playerid);
if(GetPVarInt(playerid, "usingfirstaid") == 1)
{
firstaidexpire(playerid);
}
SetPVarInt(playerid,"MedicCall",1);
}
case 2:
{
SetPVarInt(playerid,"EMSAttempt", 2);
ClearAnimations(playerid);
ApplyAnimation(playerid, "SWAT", "gnstwall_injurd", 4.0, 0, 1, 1, 1, 0, 1);
SetPlayerHealth(playerid, 100);
RemoveArmor(playerid);
}
}
return 1;
}




Re: how to not ClearAnimations - sonn51280 - 21.08.2018

hepl my


Re: how to not ClearAnimations - m4karow - 21.08.2018

wat?


Re: how to not ClearAnimations - sonn51280 - 21.08.2018

check video yo utube.com/...


Re: how to not ClearAnimations - sonn51280 - 21.08.2018

how to not ClearAnimations ?