Raised This Month: $32 Target: $400
 8% 

Knife 2 draw animations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
almazmusiq
New Member
Join Date: Sep 2019
Old 09-21-2019 , 09:32   Knife 2 draw animations
Reply With Quote #1

Hey guys I'm new here.

I have a knife that has 2 draw animations but it is only using one right now.
Is there a way so when I draw the knife one of the animations will be play randomly or at least the other one because I am sick of seeing the first one
I am sorry if this was already asked but I couldnt find anything when I searched for it.

Thanks in advance!

edit: https://gamebanana.com/skins/157495 downloaded from here

Last edited by almazmusiq; 09-21-2019 at 10:03.
almazmusiq is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-21-2019 , 09:40   Re: Knife 2 draw animations
Reply With Quote #2

upload your model

Last edited by LearninG; 09-21-2019 at 09:42.
LearninG is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-21-2019 , 15:13   Re: Knife 2 draw animations
Reply With Quote #3

animations are played randomly.
Code:
#include <amxmodx> #include <hamsandwich> #include <fakemeta> new const VERSION[] = "1.0" public plugin_init() {     register_plugin("Knife Draw Animations" , VERSION , "LearninG")     RegisterHam(Ham_Item_Deploy, "weapon_knife", "OnItemDeployPost", 1) } public OnItemDeployPost(ent) {     new id = get_pdata_cbase(ent , 41 , 4)     if (!pev_valid(id)) return     switch (random_num(1,2))     {         case 1:         {             UTIL_PlayAnimation(id , 3) // "3" draw squence number         }         case 2:         {             UTIL_PlayAnimation(id , 11) // "11" draw2 squence number         }     } } // Arkshine stock UTIL_PlayAnimation ( const id, const i_Animation ) {     set_pev ( id, pev_weaponanim, i_Animation );     message_begin ( MSG_ONE, SVC_WEAPONANIM, _, id );     write_byte ( i_Animation );     write_byte ( pev ( id, pev_body ) );     message_end (); }

Last edited by LearninG; 09-21-2019 at 15:14.
LearninG is offline
almazmusiq
New Member
Join Date: Sep 2019
Old 09-22-2019 , 06:36   Re: Knife 2 draw animations
Reply With Quote #4

Thank you LearninG,
it does work!
almazmusiq is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode