Animation index.
#1

Hey, I am making anti-airbrake/tp script. It's almost done, I only need animation index id when player jumps out of the car when it goes fast. I tried to debug it with OPEV, but it always return 0 somewhy. Also, if possible IsCarFalling, sometimes when car falls it detects it as airbrake.

Thanks.
Reply
#2

I don't know about the animation, but the IsCarFalling thing is pretty impossible...
Reply
#3

Look in test_cmds.pwn - a filterscript that comes with the SA:MP server.

IsCarFalling is piss-easy - get the vehicle velocity (GetVehicleVelocity) and if the Z is quite low (not sure how low - make a test command) they're falling.
Reply
#4

Quote:
Originally Posted by MP2
Посмотреть сообщение
Look in test_cmds.pwn - a filterscript that comes with the SA:MP server.

IsCarFalling is piss-easy - get the vehicle velocity (GetVehicleVelocity) and if the Z is quite low (not sure how low - make a test command) they're falling.
Look in that filterscript for what?

And yes, Im going to make some test tommorow (about the velocity)
Reply
#5

Quote:
Originally Posted by MP2
Посмотреть сообщение
Look in test_cmds.pwn - a filterscript that comes with the SA:MP server.

IsCarFalling is piss-easy - get the vehicle velocity (GetVehicleVelocity) and if the Z is quite low (not sure how low - make a test command) they're falling.
Oh, I'm not familiar with GetVehicleVelocity, sorry.
Reply
#6

https://sampwiki.blast.hk/wiki/GetVehicleVelocity
Reply
#7

Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        new msg[128];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
        format(msg, 128, "Running anim: %s %s", animlib, animname);
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }
    return 1;
}
Credits: Wiki
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)