How do you remove the knife's assassination ability please?
#1

Hi, i have been looking around the forums but never found a way to remove the ability of the 'assassination' that the knife has automatically. Is there even a way? I'm sure i have watched videos where people have done it but i can't figure it out.

Thanks alot
Reply
#2

Well i can't tell for sure but try to search for the animation, use OnPlayerUpdate (or a timer) to check if the player is knifing some one and then ClearAnimations, or slap him.
Reply
#3

Ooh nice I'll try that, thanks.
Reply
#4

Won't work. Once it's started you can't stop it.
Reply
#5

What about this?

pawn Код:
#if !defined KEY_AIM
    #define KEY_AIM KEY_HANDBRAKE
#endif

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(GetPlayerWeapon(playerid) == 4)
        if(newkeys & KEY_AIM) ClearAnimations(playerid);
    return 1;
}
EDIT:

You could make it so it only stops the aiming animation if the player is near someone else...

pawn Код:
#if !defined KEY_AIM
    #define KEY_AIM KEY_HANDBRAKE
#endif

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(GetPlayerWeapon(playerid) == 4)
        if(newkeys & KEY_AIM && IsAnyoneNearPlayer(playerid)) ClearAnimations(playerid);
    return 1;
}

stock IsAnyoneNearPlayer(playerid)
{
    new
        Float:fPos[3]
    ;
   
    GetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
    foreach(new i : Player)
    {
        if(i == playerid) continue;
        if(IsPlayerInRangeOfPoint(i, 7.0, fPos[0], fPos[1], fPos[2]))
        {
            return true;
        }
    }
    return false;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)