make player runing faster - 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: make player runing faster (
/showthread.php?tid=457633)
make player runing faster -
tomsalmon - 12.08.2013
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 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!!
Re: make player runing faster -
tomsalmon - 12.08.2013
PHP код:
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?
Re: make player runing faster -
tomsalmon - 12.08.2013
There is a way to check if all the keys of the player clicks on them, including the key KEY_SPRINT them?
Re: make player runing faster -
tomsalmon - 12.08.2013
I don't have any idea what to do now :/