SA-MP Forums Archive
Help me about New death animation - 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: Help me about New death animation (/showthread.php?tid=592659)



Help me about New death animation - Bumie - 28.10.2015

In my gamemode, this is my animation "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);.
And I want to change the animation like sever LS-RP, but I don't know the name of the animation. Please help
Some one ask me to find it at https://sampwiki.blast.hk/wiki/Animations. But there're to much animation and I don't know where I should start to test, so I left a question here, hope some one help. Thank you
Код:
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~/chapnhan chet hoac /dichvu capcuu", 5000, 3);
			ClearAnimations(playerid);
			ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
			SetPlayerHealth(playerid, 100);
			RemoveArmor(playerid);
			if(GetPVarInt(playerid, "usingfirstaid") == 1)
			{
			    firstaidexpire(playerid);
			}
			SetPVarInt(playerid,"MedicCall",1);
			new string[128];
			dielabel[playerid] = Create3DTextLabel(" ",0xFF0000FF,30.0,40.0,50.0,15.0,0);
  			format(string,sizeof(string),"(( Nguoi nay dang bi thuong ))");
  			Update3DTextLabelText(dielabel[playerid], 0xFF0000FF, string);
  			Attach3DTextLabelToPlayer(dielabel[playerid], playerid, 0.0, 0.0, 0.4);
  			SendClientMessageEx(playerid, COLOR_TWBLUE, "Su dung lenh [/chapnhan chet] neu ban da het co hoi song sot.");
  			//TogglePlayerControllable(playerid,0);
		}
https://www.youtube.com/watch?v=8NtP...ature=*********
The animation is in the last of the video


Re: Help me about New death animation - N0FeaR - 29.10.2015

How ls-rp animation look like got any pic or video?


Re: Help me about New death animation - Bumie - 29.10.2015

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
How ls-rp animation look like got any pic or video?
https://www.youtube.com/watch?v=8NtP...ature=*********
The animation is in the last of the video


Re: Help me about New death animation - DemME - 29.10.2015

this one?
Quote:

ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);




Re: Help me about New death animation - Bumie - 30.10.2015

Quote:
Originally Posted by DemME
Посмотреть сообщение
this one?
I have add your animation line to my script and test, but nothing happen, the character still standing without doing. Are you forgot something?


Re: Help me about New death animation - N0FeaR - 30.10.2015

Try this!

PHP код:
case 1:
        {
            
Streamer_UpdateEx(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
            
            
SetPlayerPos(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
            
SetPlayerVirtualWorld(playeridGetPVarInt(playerid,"MedicVW"));
              
SetPlayerInterior(playeridGetPVarInt(playerid,"MedicInt"));
            
SetPVarInt(playerid"EMSAttempt", -1);
            if(
GetPlayerInterior(playerid) > 0Player_StreamPrep(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"), FREEZE_TIME);
            
GameTextForPlayer(playerid"~r~Bi thuong~n~~w~/chapnhan chet hoac /dichvu capcuu"50003);
            
ApplyAnimation(playerid"CRACK""null"4.0000101); 
            
SetPlayerHealth(playerid100);
            
RemoveArmor(playerid);
            if(
GetPVarInt(playerid"usingfirstaid") == 1)
            {
                
firstaidexpire(playerid);
            }
            
SetPVarInt(playerid,"MedicCall",1);
            new 
string[128];
            
dielabel[playerid] = Create3DTextLabel(" ",0xFF0000FF,30.0,40.0,50.0,15.0,0);
              
format(string,sizeof(string),"(( Nguoi nay dang bi thuong ))");
              
Update3DTextLabelText(dielabel[playerid], 0xFF0000FFstring);
              
Attach3DTextLabelToPlayer(dielabel[playerid], playerid0.00.00.4);
              
SendClientMessageEx(playeridCOLOR_TWBLUE"Su dung lenh [/chapnhan chet] neu ban da het co hoi song sot.");
              
//TogglePlayerControllable(playerid,0);
        




Re: Help me about New death animation - Bumie - 30.10.2015

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
Try this!
Still not working I will show you the code all of my ApplyAnimation when died of my gamemode.
PHP код:
//1
if(GetPVarInt(i"EMSAttempt") == -1)
                {
                    if(
GetPlayerAnimationIndex(i) != 746ClearAnimations(i), ApplyAnimation(i"CRACK""null"4.0000101);
                    if(!
GetPVarType(i"StreamPrep") && !IsPlayerInRangeOfPoint(i3.0GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")) && !GetPVarInt(i"OnStretcher"))
                    {
                        
SendClientMessageEx(iCOLOR_WHITE"Ban da bi bat tinh, ban se duoc dua ve benh vien de dieu tri.");
                        
KillEMSQueue(i);
                        
                        
SpawnPlayer(i);
                    }
                    
GameTextForPlayer(i"~r~Bi thuong~n~~w~/chapnhan chet hoac /dichvu capcuu"50003);
                }
//2
if(GetPVarInt(i"EMSAttempt") == 1)
                {
                    if(
GetPlayerAnimationIndex(i) != 746ClearAnimations(i), ApplyAnimation(i"CRACK""null"4.0000101);
                    if(!
GetPVarType(i"StreamPrep") && !IsPlayerInRangeOfPoint(i3.0GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")) && !GetPVarInt(i"OnStretcher"))
                    {
                        
SendClientMessageEx(iCOLOR_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..."50003);
                }
//3
if(GetPlayerInterior(playerid) > 0Player_StreamPrep(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"), FREEZE_TIME);
            
GameTextForPlayer(playerid"~r~Bi thuong~n~~w~/chapnhan chet hoac /dichvu capcuu"50003);
            
ClearAnimations(playerid);
            
ApplyAnimation(playerid"CRACK""null"4.0000101);
            
SetPlayerHealth(playerid100);
            
RemoveArmor(playerid);
            if(
GetPVarInt(playerid"usingfirstaid") == 1)
            {
                
firstaidexpire(playerid);
            }
//4
if(GetPVarType(iPlayer"MedicCall")) {
                
ClearAnimations(iPlayer);
                
ApplyAnimation(playerid"CRACK""null"4.0000101);
            }
            
DeletePVar(iPlayer"StreamPrep");
//5
if(GetPVarType(playerid"Injured"))
        {
            
            
SetPlayerPos(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
            
ClearAnimations(playerid);
            
ApplyAnimation(playerid"CRACK""null"4.0000101);
        } 



Re: Help me about New death animation - N0FeaR - 30.10.2015

Sorry, remove this
PHP код:
ClearAnimations(playerid); 



Re: Help me about New death animation - Bumie - 31.10.2015

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
Sorry, remove this
PHP код:
ClearAnimations(playerid); 
remove all of them right ?


Re: Help me about New death animation - N0FeaR - 01.11.2015

Quote:
Originally Posted by Bumie
Посмотреть сообщение
remove all of them right ?
Yes.