15.11.2010, 18:53
Hey guys, how can i apply an animation to a NPC?
i tried to following but it didnt work:
i tried to following but it didnt work:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"PED");
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "NPC", true))
{
SetPlayerSkin(playerid,104);
SetPlayerPos(playerid,221.448440,1241.429443,1082.140625);
SetPlayerFacingAngle(playerid,245);
GivePlayerWeapon(playerid,22,1000);
ApplyAnimation(playerid,"PED","gang_gunstand",4.0,1,1,1,1,1);
}
}