make player runing faster
#1

hello, i make a zombies mode and i want zombies to run faster then other players.
i already used UsePlayerPedAnims();
and i made this code:

PHP код:
    if(HOLDING(KEY_SPRINT))
     {
        new 
FloatvXFloatvY,FloatvZ;
        
GetPlayerVelocity(playeridvXvYvZ);
        
SetPlayerVelocity(playerid, (vX 2.5), (vY 2.5), (vZ 1.01));
    } 
and when i jump and press sprint key, its working. on foot it isn't working.
there is an other way to make a fast runing for some players? please help me i really need this!!
Reply
#2

PHP код:
    new Keys,ud,lr;
    
GetPlayerKeys(playerid,Keys,ud,lr);
    if(
Keys == KEY_SPRINT)
    {
          new 
FloatvXFloatvY,FloatvZ;
          
GetPlayerVelocity(playeridvXvYvZ);
        
SetPlayerVelocity(playerid, (vX 1.0), (vY 1.0), (vZ 0.01));
    } 
i made this on OnPlayerUpdate... not working :/ how to fix that?
Reply
#3

There is a way to check if all the keys of the player clicks on them, including the key KEY_SPRINT them?
Reply
#4

I don't have any idea what to do now :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)