[SOLVED]Animation Preloading
#1

I've been trying for hours now to preload this animation on an NPC but it seems to be getting nowhere.

heres the code, why wont it work. The NPC just stands there.
pawn Code:
#include <a_samp>

new RandomVeh;
new Loaded[MAX_PLAYERS];

public OnGameModeInit()
{
    RandomVeh = AddStaticVehicle(457,1402.7024,2816.2568,10.4394,89.0047,13,1);
    ConnectNPC("Stripper","stripper");
    return 1;
}

public OnPlayerConnect(playerid)
{
  Loaded[playerid] = 0;
  return 1;
}

public OnPlayerSpawn(playerid)
{
  if(!Loaded[playerid])
    {
        PreloadAnimLib(playerid,"DANCING");
        Loaded[playerid] = 1;
    }
   
  if(!IsPlayerNPC(playerid)) return 0;

    new playername[64];
    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername,"Stripper",true)) {
    SetSpawnInfo( playerid, 0, 87, 1203.9446,16.5226,1000.9219, 344.9598, 0, 0, 0, 0, 0, 0 );
    PutPlayerInVehicle(playerid, RandomVeh, 0);
    ApplyAnimation(playerid,"DANCING","DAN_Loop_A",4.1,1,1,1,1,0);
    }
  return 1;
}

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

Reply


Messages In This Thread
[SOLVED]Animation Preloading - by V1ceC1ty - 29.01.2010, 12:21
Re: Animation Preloading - by wangdata - 29.01.2010, 14:21
Re: [SOLVED]Animation Preloading - by wangdata - 30.01.2010, 01:13

Forum Jump:


Users browsing this thread: 1 Guest(s)