Able to jump but disable climbing?
#1

Is it possible to do such thing? Like that the person can jump but not climb over fences
Reply
#2

Yes it is, but only when you set the player's interior.
In interiors it's possible to jump but not to climb, I do not know any other way.
Reply
#3

Make so it press "Enter" Every time when jumping, I don't know if it's possible thought.
Reply
#4

You can check the player's animation on OnPlayerUpdate and found if he's climbing and clear his animation.
Reply
#5

Quote:
Originally Posted by FiReAlEx
Посмотреть сообщение
You can check the player's animation on OnPlayerUpdate and found if he's climbing and clear his animation.
How can I do that?
Reply
#6

Those are the climbing animation's name. The rest should be easy.
CLIMB_idle
CLIMB_jump
CLIMB_jump2fall
CLIMB_jump_B
CLIMB_Pull
CLIMB_Stand
CLIMB_Stand_finish
Reply
#7

I really don't get your point, how is that suppose to stop a player from climbing.
Reply
#8

You check if the player is doing one of this animation on OnPlayerUpdate and then if it's true, you clear his animation with ClearAnimation
Reply
#9

So like this?
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(CLIMB_idle || CLIMB_jump ||CLIMB_jump2fall ||CLIMB_jump_B || CLIMB_Pull || CLIMB_Stand || CLIMB_Stand_finish)
    {
    ClearAnimation(playerid);
    }
    return 1;
}
Reply
#10

pawn Код:
if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        new msg[128];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
        if(!strcmp(animname, "yournames", true)) {
        ClearAnimations(playerid);
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)