A small question for a whole topic(how to check if a player is using an certain anim?)
#1

Hey i was wondering if it is possible to check if someone is using a certain anim.
Also i would like to know wich anim is the one from freefalling?(like falling from a building)

Anyway, why would i need that well i am trying to make a function called IsPlayerFalling, but for that i need to check the anim for the freefall, if anyone can help that would be realy apreciated!

EDIT:
Oke what could be wrong with this?(besides everything lol:
pawn Код:
stock IsPlayerFreeFalling(playerid)
{
        if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[1130];
        new animname[1130];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,1130,animname,1130);
    GivePlayerWeapon(playerid, 46, 1);
    }
    return 1;
}
Because it gives this error:
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PFN.inc(73) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

pawn Код:
GetPlayerAnimationIndex(playerid);
https://sampwiki.blast.hk/wiki/GetPlayerAnimationIndex

Example of usage:
pawn Код:
public IsPlayerUsingParachute(playerid)
{
    new index = GetPlayerAnimationIndex(playerid);
    return (index >= 963 && index <= 979);//true if player is falling with an opened parachute
}
pawn Код:
public IsPlayerSkydiving(playerid)
{
    new index = GetPlayerAnimationIndex(playerid);
    return (index >= 958 && index <= 962);//true if player is falling with a closed parachute
}
Adjust to suit your needs.
Reply
#3

Oke sow but now i see those numbers how to use these? Wich number is for the falling?(i mean this: animlib: PED Anim: FALL_fall).
Reply
#4

Quote:
Originally Posted by justsomeguy
Посмотреть сообщение
Oke sow but now i see those numbers how to use these? Wich number is for the falling?(i mean this: animlib: PED Anim: FALL_fall).
You can use the code in the wiki, it will give you the name+the number.
Reply
#5

Yes but how do i find the numbers that are needed for the anim?
Reply
#6

Tada!
Reply
#7

Thanks!! That helped me out so bad!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)