Anti B Hop
#1

Hello, any1 can give me a code of Anti B hop in game roles server. If people is runing and trying to jump he will stop.
Reply
#2

Here
Reply
#3

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_JUMP))
    {
        return 0;
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_JUMP))
    {
        return 0;
    }
    return 1;
}
This code i need to write in my GM end or where? I got 1 ERROR

error 021: symbol already defined: "OnPlayerKeyStateChange"
Reply
#5

If you have already OnPlayerKeyStateChange,then

pawn Код:
if((newkeys & KEY_JUMP))
    {
        return 0;
    }
Only.
Reply
#6

Returning 0 DOES not stop a player from bunny hopping. Please read the wiki for more information.
Reply
#7

This just stop when a player press the key for jump.

But you can alway try that FS.
Reply
#8

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
If you have already OnPlayerKeyStateChange,then

pawn Код:
if((newkeys & KEY_JUMP))
    {
        return 0;
    }
Only.
I have no error now, but i can still to bhop than i run.. :/
Reply
#9

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
This just stop when a player press the key for jump.

But you can alway try that FS.
Oh god, Firstly, if that does work players can't jump any more in the gamemode which is a total failure.

Lastly,

Quote:
Originally Posted by wiki.sa-mp.com
1 - Allows this callback to be called in other scripts. It is always called first in gamemodes so retuning 0 there blocks filterscripts from seeing it.
Reply
#10

Then it's my mistake sorry.

Try the FS that Retardedwolf linked u.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)