related to jumps.
#1

Hello,

I just want to know if there a function or (etc) I can use to make certain players can't climb any object, is that possible?

Thank you.
Reply
#2

Do you mean can't jump at ALL or just on a CERTAIN object?
Reply
#3

Umm he can jump , but in the same time he can't climb objects
Reply
#4

Use the velocity function.

- https://sampwiki.blast.hk/wiki/SetPlayerVelocity
- https://sampforum.blast.hk/showthread.php?tid=296769
Reply
#5

There's a way to do it, BUT, he can't jump at all in the area around the object(s)
pawn Код:
public OnPlayerUpdate(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    if(IsPlayerInRangeOfPoint(i, 2, objectX, objectY, objectZ))
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(i, x, y, z);
        if(z > 0)
        {
            SetPlayerPos(i, x, y, 0);
        }
    }
    return 1;
}
I'm not sure about this, but you can try it....won't hurt.
Reply
#6

Creating a loop like that in OnPlayerUpdate is not very smart.
Reply
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
Not easily. There's no function for it, but I can imagine a system to do it. The question is, what happens if they go up some stairs and jump down to the top of the object? The ability to climb on objects is determined by their "col" (collision) object - if there is a flat top to the col object below a certain height above the ground, okayers can catch it. If you were to find an invisible object (or try to change the texture on an object to an invisible one) and place that object exactly on top of the first object, players would no longer be able to get on top. Of course, this is insanely hard to do well for the whole of San Andreas.
LOL okay, thank you, it could be hard but still it can be made by using a lot of functions. Any way thank you

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
also Thank you!
Reply
#8

Or you can use a function that checks the certain player's current animation. If the climbing animation is playing apply ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1) (Clears the animation, making the player fall down.) to the subject. For that, you would need a timer. . . 50-100 milliseconds approximately.
Reply
#9

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Creating a loop like that in OnPlayerUpdate is not very smart.
Yeah, I always keep screwing that part up, anyways, he can set a looping timer for the matter...
Reply
#10

Quote:
Originally Posted by Jaxson
Посмотреть сообщение
Or you can use a function that checks the certain player's current animation. If the climbing animation is playing apply ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1) (Clears the animation, making the player fall down.) to the subject. For that, you would need a timer. . . 50-100 milliseconds approximately.
Amazing idea. Thank you!

but before making/adding it (thats my problem) how could I define when a player climbs object?

(Also Thanks for every body tried to help)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)