Animationen in 0.3b
#1

Hey

I have only 1 Animation.
but this only 1 dosent work.

If a player dies he will be seriously injured and do an animation.
But the player dies an he is only freezed.

Here My Animation:

Код:
ApplyAnimation(playerid,"CRACK","crckdeth2",3.0,1,1,1,1,0);
Reply
#2

Have you preloaded the anim when the player spawns?
pawn Код:
PreloadAnimLib(playerid,"CRACK");
Reply
#3

Quote:
Originally Posted by Johndaonee
Посмотреть сообщение
Have you preloaded the anim when the player spawns?
pawn Код:
PreloadAnimLib(playerid,"CRACK");
I'm having trouble locating that function on the wiki. What does it actually do?
Reply
#4

Should i only write this funktion under OnPlayerSpawn?
Reply
#5

It preloads the anim for the player, if you have the problem where you have to type an animation command twice, then this fixes it.
And yes only put it once it loads all the anims in that category for him than.
Remember there are more categories than "CRACK"
Reply
#6

so i write it under OnPlayerSpawn.

i get this:

Код:
C:\Users\Simon Siggelkow\Desktop\Server 3b\gamemodes\RL.pwn(2281) : error 017: undefined symbol "PreloadAnimLib"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#7

Psycho77, please learn the basic before starting to code. I can see you didn't learn the basic at all. Do you even know how to code?

https://sampwiki.blast.hk/wiki/Scripting_Basics <- Learn that before doing anything.

undefined symbol "PreloadAnimLib".

Define it for sake! That's easy.

But I don't get why you should be using PreloadAnimLib as you have to make that function on your own..

Use
Код:
ClearAnimations(playerid);
at OnPlayerDisconnect and OnPlayerDeath.
Reply
#8

all this i have already! i never heard the function "PreloadAnimLib" before!
and i already have define it but in doesnґt work.
Reply
#9

No, you don't have
pawn Код:
ClearAnimations(playerid);
or else it would work.
And no, there is no function like PreloadAnimLib.
Reply
#10

ahh i see you know my script.

here:

Код:
public OnPlayerSpawn(playerid)
{
    ClearAnimations(playerid);
    PreloadAnimLib(playerid,"CRACK");
    if(Spieler[playerid][Verletzt] == 1)
    {
        KillTimer(todtimer1[playerid]);
        KillTimer(todtimer2[playerid]);
        SetPlayerPos(playerid,Spieler[playerid][posx],Spieler[playerid][posy],Spieler[playerid][posz]);
        SetPlayerInterior(playerid, Spieler[playerid][interior]);
        SetPlayerVirtualWorld(playerid,Spieler[playerid][virtualw]);
        freeze(playerid);
        todtimer1[playerid] = SetTimerEx("tot1",180000,0,"i",playerid);
        Spieler[playerid][Spawn]--;
        ApplyAnimation(playerid,"CRACK","crckdeth2",3.0,1,1,1,1,0);
    }    
    if(Spieler[playerid][Tot] == 1)
    {
        KillTimer(todtimer1[playerid]);
        KillTimer(todtimer2[playerid]);
        SetPlayerPos(playerid,Spieler[playerid][posx],Spieler[playerid][posy],Spieler[playerid][posz]-120);
        SetPlayerInterior(playerid,Spieler[playerid][interior]);
	SetPlayerInterior(playerid,Spieler[playerid][interior]);
	SetPlayerVirtualWorld(playerid,Spieler[playerid][virtualw]);
	todtimer2[playerid] = SetTimerEx("tot2",60000,0,"i",playerid);
	Spieler[playerid][Verletzt] = 0;
	Spieler[playerid][Tot] = 1;
	SetPlayerCameraPos(playerid,Spieler[playerid][posx],Spieler[playerid][posy],Spieler[playerid][posz]+75);
	SetPlayerCameraLookAt(playerid,Spieler[playerid][posx],Spieler[playerid][posy],Spieler[playerid][posz]);
	Spieler[playerid][Spawn]--;
        freeze(playerid);
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	ClearAnimations(playerid);
        SendClientMessage(playerid,0xFF9190FF,"Du bist schwerverletzt, rufe mit /service einen Notarzt!");
	GetPlayerPos(playerid,Spieler[playerid][posx],Spieler[playerid][posy],Spieler[playerid][posz]);
	Spieler[playerid][interior] = GetPlayerInterior(playerid);
	Spieler[playerid][virtualw] = GetPlayerVirtualWorld(playerid);
        Spieler[playerid][Verletzt] = 1;
        return 1;
}

stock PreloadAnimLib(playerid, animlib[])
{
	ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)