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

Get Sequence


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-11-2012 , 17:01   Re: Get Sequence
Reply With Quote #11

Here an example with this stock :

Spoiler


You can use like that :
Code:
#include <amxmodx> public plugin_init() {     new const modelToCheck[] = "models/player/urban/urban.mdl";         new sequenceName[ 32 ];     getSequenceName( modelToCheck, .sequence = 2, sequenceName );         log_amx( "SequenceName = %s", sequenceName );         // It returns "crouch_idle" }


Or looping all the sequences, like that :

Code:
#include <amxmodx> public plugin_init() {     new const modelToCheck[] = "models/player/urban/urban.mdl";         new sequenceName[ 32 ];     new i;         while( getSequenceName( modelToCheck, i++, sequenceName ) )     {         log_amx( "SequenceName = %d) %s", i - 1, sequenceName );     } }
__________________

Last edited by Arkshine; 10-11-2012 at 18:20.
Arkshine is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 10-11-2012 , 20:42   Re: Get Sequence
Reply With Quote #12

Quote:
Originally Posted by Arkshine View Post
Here an example with this stock :

Spoiler


You can use like that :
Code:
#include <amxmodx> public plugin_init() {     new const modelToCheck[] = "models/player/urban/urban.mdl";         new sequenceName[ 32 ];     getSequenceName( modelToCheck, .sequence = 2, sequenceName );         log_amx( "SequenceName = %s", sequenceName );         // It returns "crouch_idle" }


Or looping all the sequences, like that :

Code:
#include <amxmodx> public plugin_init() {     new const modelToCheck[] = "models/player/urban/urban.mdl";         new sequenceName[ 32 ];     new i;         while( getSequenceName( modelToCheck, i++, sequenceName ) )     {         log_amx( "SequenceName = %d) %s", i - 1, sequenceName );     } }
Oh Arkshine, If daredevil says it cant be done, then arkshine pop out somewhere and proves that im wrong again, like always. Thank you !
But seriously, you made a good job.
.Dare Devil. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-12-2012 , 11:19   Re: Get Sequence
Reply With Quote #13

Most of things people think it's impossible, it's actually possible, you just need to find a way.

About parsing file, it's the same for .spr, bsp, wav, etc. ; once you know the structure of the file, it's fairly easy to retrieve informations inside. I think I will do a module for that, it may be useful.
__________________
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-12-2012 , 11:20   Re: Get Sequence
Reply With Quote #14

Most of things people think it's impossible, it's actually possible, you just need to find a way.

About parsing file, it's the same for .spr, bsp, wav, etc. ; once you know the structure of the file, it's fairly easy to retrieve informations inside. I think I will do a module for that, it may be useful.
__________________
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 10-12-2012 , 11:26   Re: Get Sequence
Reply With Quote #15

Quote:
Originally Posted by Arkshine View Post
Most of things people think it's impossible, it's actually possible, you just need to find a way.
Arkshine,beautifully stated)
__________________

Last edited by Bos93; 10-12-2012 at 11:26.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Reply



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 23:28.


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