I need a Imposible Function!! #2
#1

I need a function that get player anim

if player using (killing with knife from behind) return true;
else return false; XDDDDDDD
Reply
#2

pawn Код:
stock IsPlayerKillingWithKnife(playerid)
{
    if(GetPlayerAnimationIndex(playerid) == KnifeKillAnim) return true;
    return false;
}
Replace 'KnifeKillAnim' with the animation ID. I don't know what ID it is for killing behind. I don't work with animations a lot, so I am not certain that it will work, but it compiles just fine if I put in a valid animation ID.
Reply
#3

Quote:
Originally Posted by Bicentric
Посмотреть сообщение
pawn Код:
stock IsPlayerKillingWithKnife(playerid)
{
    if(GetPlayerAnimationIndex(playerid) == KnifeKillAnim) return true;
    return false;
}
Replace 'KnifeKillAnim' with the animation ID. I don't know what ID it is for killing behind. I don't work with animations a lot, so I am not certain that it will work, but it compiles just fine if I put in a valid animation ID.
i need the id too -_-
Reply
#4

The knife animations
pawn Код:
KILL_Knife_Ped_Damage
KILL_Knife_Ped_Die
KILL_Knife_Player
KILL_Partial
knife_1
knife_2
knife_3
Knife_4
knife_block
Knife_G
knife_hit_1
knife_hit_2
knife_hit_3
knife_IDLE
knife_part
WEAPON_knifeidle
Reply
#5

Hey Dwane i want the Anim that when player Kill player in ninja style! ( like in SP in mission stealing the book in madd ddog's book ) XD

you know what im saying
Reply
#6

Use Bicentric's function skeleton, and place in the ID that you find, you can use this handy little snippet to do it yourself:
pawn Код:
public OnPlayerUpdate(playerid)
{
    static index;
    index = GetPlayerAnimationIndex(playerid);
   
    if (index)
    {
        new animlib[32], animname[32], msg[128];
        GetAnimationName(index, animlib, 32, animname, 32);
        format(msg, 128, "Running animation: %s/%s, index: %d", animlib, animname, index);
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }
    return 1;
}
Checking just the animation index is better and a little faster than slowly comparing the animations name.
Just put this in your mode and compile. As soon as you spawn, you will get spammed with Running animation: messages, so just get a player on your server and knife him from behind. Then check your chatlog for the animation index.
Reply
#7

you will get full list of animation here
Reply
#8

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
you will get full list of animation here
Dude, i dont know the one i need from that all :3
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)