SA-MP Forums Archive
Change Running Style - 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: Change Running Style (/showthread.php?tid=320087)



Change Running Style - LasTDarK - 21.02.2012

Hello,
Im new in pawno.I need cj's running style with command.
Ex: /givemespeed
increase player's running speed
Can someone help me?


Re: Change Running Style - emokidx - 21.02.2012

for cj running style
pawn Код:
UsePlayerPedAnims(); // put under "OnGameModeInit"
idk about the /givespeed


Re: Change Running Style - MP2 - 21.02.2012

You can't change it per player, or back to normal ped ones.

https://sampwiki.blast.hk/wiki/UsePlayerPedAnims


Re: Change Running Style - Konstantinos - 21.02.2012

Actually he can with a loop.
Define a variable and in the command /givemespeed set the variable to 1;
Example:
pawn Код:
new CJ_Speed[ MAX_PLAYERS ];
pawn Код:
public OnGameModeInit( )
{
    for( new i = 0; i < MAX_PLAYERS; i ++ )
    {
        if( CJ_Speed[ i ] == 1 ) UsePlayerPedAnims( );
    }
    return 1;
}
pawn Код:
public OnPlayerConnect( playerid )
{
    CJ_Speed[ playerid ] = 0;
    return 1;
}
pawn Код:
CMD:givemespeed( playerid, params[ ] )
{
    CJ_Speed[ playerid ] = 1;
    return 1;
}



Re: Change Running Style - LasTDarK - 22.02.2012

@Dwane Thanks I meant this but IDK working this.I will test this


Re: Change Running Style - Konstantinos - 22.02.2012

It will work, but after using the command, someone can run fast until he disconnects. You can make it for a minute using a SetTimerEx and on th Callback set the variable to 0 to stop it.
pawn Код:
CJ_Speed[ playerid ] = 0;



Re : Change Running Style - luopifr - 18.11.2013

Thank's Very Mutch


Re: Change Running Style - fordawinzz - 18.11.2013

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Actually he can with a loop.
Define a variable and in the command /givemespeed set the variable to 1;
Example:
pawn Код:
new CJ_Speed[ MAX_PLAYERS ];
pawn Код:
public OnGameModeInit( )
{
    for( new i = 0; i < MAX_PLAYERS; i ++ )
    {
        if( CJ_Speed[ i ] == 1 ) UsePlayerPedAnims( );
    }
    return 1;
}
pawn Код:
public OnPlayerConnect( playerid )
{
    CJ_Speed[ playerid ] = 0;
    return 1;
}
pawn Код:
CMD:givemespeed( playerid, params[ ] )
{
    CJ_Speed[ playerid ] = 1;
    return 1;
}


mp2 said that you can't set it for a single player and that's right. use animations to change the walk style.