Change Running Style
#1

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

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

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

https://sampwiki.blast.hk/wiki/UsePlayerPedAnims
Reply
#4

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;
}
Reply
#5

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

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;
Reply
#7

Thank's Very Mutch
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)