SA-MP Forums Archive
Animation NPC - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Animation NPC (/showthread.php?tid=105096)



Animation NPC - Pawno_Master - 27.10.2009

How can i make it that some NPC's do a animation i searched at more npc scripts but i found NOTHING in the script about animation but the npocs use them

help me :O


Re: Animation NPC - MadeMan - 27.10.2009

Not sure, but maybe ApplyAnimation works on NPCs too?


Re: Animation NPC - Pawno_Master - 27.10.2009

No i tried that already
wont work
and SetPlayerSpecialAction wont work too


Re: Animation NPC - Gergo1352 - 27.10.2009

Quote:
Originally Posted by ekeleke
No i tried that already
wont work
and SetPlayerSpecialAction wont work too
Both should work.


Re: Animation NPC - Pawno_Master - 27.10.2009

wont work at a npc


Re: Animation NPC - Pawno_Master - 28.10.2009

bump


Re: Animation NPC - Sergei - 28.10.2009

SetPlayerSpecialAction and ApplyAnimation work on NPCs since NPCs work like normal players.


Re: Animation NPC - Pawno_Master - 28.10.2009

but i tried them and they wont do anything


Re: Animation NPC - Pawno_Master - 28.10.2009

Код:
//---------------------------------------------------------------------------------//
//Aztec NPC filterscrip written by Ekeleke//
//Do not remove these credit's!//
//Have much fun with these npc's check the forum page for new versions!!!//

#include <a_samp>

new Random;
new azteccar;

public OnGameModeInit()
{

	// NPCS
	ConnectNPC("Aztec1","azteclopen");
	ConnectNPC("Aztec2","aztecsmoking");
	ConnectNPC("Aztec3","azteccalling");
	ConnectNPC("Aztec4","aztecdriving");

	azteccar = AddStaticVehicle(477,2044.8854,1473.2106,10.4494,181.3339,101,1); //azteccar

	Random = AddStaticVehicle(420,2044.8854,1473.2106,10.4494,181.3339,6,1); // Makes sure the NPC Spawns

	return 1;
}

public OnPlayerSpawn(playerid)
{
  if(!IsPlayerNPC(playerid)) return 0;

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


	if(!strcmp(playername,"Aztec1",true)) {
	  SetSpawnInfo( playerid, 0, 115, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
		PutPlayerInVehicle(playerid, Random, 0);
		SetPlayerColor(playerid,0xFFFF00AA);
		ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
	}
	else if(!strcmp(playername,"Aztec2",true)) {
 		SetSpawnInfo( playerid, 0, 116, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
	  PutPlayerInVehicle(playerid, Random, 0);
	  SetPlayerColor(playerid,0xFFFF00AA);
	}
	else if(!strcmp(playername,"Aztec3",true)) {
    SetSpawnInfo( playerid, 0, 114, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
	  PutPlayerInVehicle(playerid, Random, 0);
	  SetPlayerColor(playerid,0xFFFF00AA);
	}
	else if(!strcmp(playername,"Aztec4",true)) {
	  SetSpawnInfo( playerid, 0, 115, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
		PutPlayerInVehicle(playerid, azteccar, 0);
		SetPlayerColor(playerid,0xFFFF00AA);
	}
  return 1;
}
thsts the hole script and aztec 1 has a drunk animation but he wont do the animation look at it plz


Re: Animation NPC - Pawno_Master - 28.10.2009

the vehicle will make sure that the npc spawns