OnPlayerShootPlayer bugs
#1

Well It freezes and unfreezes but the animation does not work...

pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    if(Player[Shooter][HasTaser] == 1)
    {
        if(GetPlayerWeapon(Shooter) == 23)
        {
            new Float: PHealth;
            GetPlayerHealth(Target, PHealth);
            SetPlayerHealth(Target, PHealth+HealthLost);
            TogglePlayerControllable(Target, false);
            ApplyAnimation(Target, "CRACK", "crckidle4", 4.0, 1, 0, 0, 0, 0);
            SetTimerEx("TaserClear",7000,false,"d",Target);
            fSendClientMessage(Shooter, YELLOW, "Info: You have tased %s", RPName(Target));
        }
    }
    return 1;
}
Can someone help?
Reply
#2

preload your animation libraries.

https://sampforum.blast.hk/showthread.php?tid=124184
Reply
#3

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    PreloadAnimLib(playerid,"CRACK");
    return 1;
}
gets this error:
C:\Users\User\Desktop\VL-Roleplay\GTA RP Script Linux\gamemodes\RolePlay.pwn(2949) : error 017: undefined symbol "PreloadAnimLib"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

pawn Код:
stock PreloadAnimLib(playerid, animlib[])
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
Reply
#5

Thanks Fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)