PDA

View Full Version : make player runing faster


tomsalmon
12/08/2013, 01:54 PM
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:

if(HOLDING(KEY_SPRINT))
{
new Float: vX, Float: vY,Float: vZ;
GetPlayerVelocity(playerid, vX, vY, vZ);
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!!

tomsalmon
12/08/2013, 02:32 PM
new Keys,ud,lr;
GetPlayerKeys(playerid,Keys,ud,lr);
if(Keys == KEY_SPRINT)
{
new Float: vX, Float: vY,Float: vZ;
GetPlayerVelocity(playerid, vX, vY, vZ);
SetPlayerVelocity(playerid, (vX * 1.0), (vY * 1.0), (vZ * 0.01));
}

i made this on OnPlayerUpdate... not working :/ how to fix that?

tomsalmon
12/08/2013, 02:43 PM
There is a way to check if all the keys of the player clicks on them, including the key KEY_SPRINT them?

tomsalmon
12/08/2013, 04:45 PM
I don't have any idea what to do now :/