[NPC] Make them spawn and Stand - 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: [NPC] Make them spawn and Stand (
/showthread.php?tid=170299)
[NPC] Make them spawn and Stand -
Lorrden - 22.08.2010
Hi, I'm just wondering if it's possible to create some NPC's and just simply make them stand somewhere (f.ex. in a store behind the counter)... Or will it need shitloads of recording etc. like if it was driving around ?
Thanks,
Lorrden.
Re: [NPC] Make them spawn and Stand -
Jeffry - 22.08.2010
Uhm, I noticed that NPCs just stand at their spawn point, if you set them into a car that does NOT exist. You could record any vehicle NPC and let him connect & spawn then use after the spawn:
SetMyPos
Might work, but dunno. Just came to my mind. ^^
Re: [NPC] Make them spawn and Stand -
Fj0rtizFredde - 22.08.2010
You could also just create a 1sec onfoot recording

then use something like this:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "MyFirstNPC", true))
{
SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
}