AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Play PlayerModel Animation (https://forums.alliedmods.net/showthread.php?t=273558)

SkumTomteN 10-21-2015 07:59

Play PlayerModel Animation
 
Hi, i want to know if i can play a whole anim on a players model.

Thanks for good explainations and solutions.

Those who dont know, have nothing to do on this thread. :)

Edit: Dont need help anymore.

OnePL 10-25-2015 21:33

Re: Play PlayerModel Animation
 
PHP Code:

stock UTIL_PlayerAnimation(idszAnimation[]) {
    static 
iAnimDesiredFloat:fFrameRateFloat:fGroundSpeedbool:bLoops;
    if((
iAnimDesired lookup_sequence(idszAnimationfFrameRatebLoopsfGroundSpeed)) == -1iAnimDesired 0;
    static 
Float:fGameTime;
    
fGameTime get_gametime();
    
set_pev(idpev_frame0.0);
    
set_pev(idpev_framerate1.0);
    
set_pev(idpev_animtimefGameTime);
    
set_pev(idpev_sequenceiAnimDesired);
    
set_pdata_int(id40bLoops4);
    
set_pdata_int(id3904);
    
set_pdata_float(id36fFrameRate4);
    
set_pdata_float(id37fGroundSpeed4);
    
set_pdata_float(id38fGameTime4);
    
set_pdata_int(id7328);
    
set_pdata_int(id7428);   
    
set_pdata_float(id220fGameTime);



SkumTomteN 10-26-2015 19:56

Re: Play PlayerModel Animation
 
Quote:

Originally Posted by OnePL (Post 2356644)
PHP Code:

stock UTIL_PlayerAnimation(idszAnimation[]) {
    static 
iAnimDesiredFloat:fFrameRateFloat:fGroundSpeedbool:bLoops;
    if((
iAnimDesired lookup_sequence(idszAnimationfFrameRatebLoopsfGroundSpeed)) == -1iAnimDesired 0;
    static 
Float:fGameTime;
    
fGameTime get_gametime();
    
set_pev(idpev_frame0.0);
    
set_pev(idpev_framerate1.0);
    
set_pev(idpev_animtimefGameTime);
    
set_pev(idpev_sequenceiAnimDesired);
    
set_pdata_int(id40bLoops4);
    
set_pdata_int(id3904);
    
set_pdata_float(id36fFrameRate4);
    
set_pdata_float(id37fGroundSpeed4);
    
set_pdata_float(id38fGameTime4);
    
set_pdata_int(id7328);
    
set_pdata_int(id7428);   
    
set_pdata_float(id220fGameTime);



Confirmed that this works?

Thanks though, could use it for some projects i have in mind :)

AGoodGuy 03-17-2016 09:47

Re: Play PlayerModel Animation
 
Confirm it work like acharm! :D


All times are GMT -4. The time now is 22:13.

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