anti-jump for roleplay - 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: anti-jump for roleplay (
/showthread.php?tid=346541)
anti-jump for roleplay -
TheDiscussionCafe - 29.05.2012
hi. i see on many rp servers and when you jump, you will not jump very far. how i make that?
Re: anti-jump for roleplay -
DaRealShazz - 29.05.2012
Do you mean bunny hopping or just that the character doesn't jump too far.
Re: anti-jump for roleplay -
TheDiscussionCafe - 29.05.2012
i mean like u know if people sprint and jump becuse they can run faster, well i dont want that. i want it so if the player sprints and then jumps (thinking he can go faster), he wont jump as far and just sprinting will be faster than sprint and jump.
Re: anti-jump for roleplay -
MP2 - 29.05.2012
GetPlayerVelocity + SetPlayerVelocity. They just half it when they jump I guess.
Re: anti-jump for roleplay -
ViniBorn - 29.05.2012
Block every jump
pawn Код:
//OnPlayerKeyStateChange
if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP))
{
new Float:VBPos[3];
GetPlayerPos(playerid,VBPos[0],VBPos[1],VBPos[2]);
SetPlayerPos(playerid,VBPos[0],VBPos[1],VBPos[2]);
}
Re: anti-jump for roleplay -
CptK - 29.05.2012
Also remember not to get the player to the same place because sometimes a player need to jump over fences and stuff, and not just bunny hop :S
Re: anti-jump for roleplay -
MP2 - 29.05.2012
Quote:
Originally Posted by Viniborn
Block every jump
pawn Код:
//OnPlayerKeyStateChange if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP)) { new Float:VBPos[3]; GetPlayerPos(playerid,VBPos[0],VBPos[1],VBPos[2]); SetPlayerPos(playerid,VBPos[0],VBPos[1],VBPos[2]); }
|
He doesn't want to STOP them from jumping. Read his post.
Re: anti-jump for roleplay -
Gangs_Rocks - 29.05.2012
Don't use UsePlayerPedAnims();
It'll stop them from running fast and jumping like CJ.
Re: anti-jump for roleplay -
Gangster-rocks - 29.05.2012
You mean Anti Bunny hoping?
Re: anti-jump for roleplay -
MP2 - 29.05.2012
Read the god damn topic, Jesus. Unless you can run and jump in a car he clearly doesn't mean that.