I need a Imposible Function!! #2 -
dr.lozer - 01.12.2012
I need a function that get player anim
if player using (killing with knife from behind) return true;
else return false; XDDDDDDD
Re: I need a Imposible Function!! #2 -
Bicentric - 01.12.2012
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.
Re: I need a Imposible Function!! #2 -
dr.lozer - 01.12.2012
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 -_-
Re: I need a Imposible Function!! #2 -
Konstantinos - 01.12.2012
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
Re: I need a Imposible Function!! #2 -
dr.lozer - 01.12.2012
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
Re: I need a Imposible Function!! #2 -
Virtual1ty - 01.12.2012
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.
Re: I need a Imposible Function!! #2 -
[MM]RoXoR[FS] - 01.12.2012
you will get full list of animation
here
Re: I need a Imposible Function!! #2 -
dr.lozer - 01.12.2012
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