SA-MP Forums Archive
Creating a stationary '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)
+--- Thread: Creating a stationary 'npc'? (/showthread.php?tid=356925)



Creating a stationary 'npc'? - doggeh - 05.07.2012

Fellow scripters,

I want to put a few stationary characters in my server, but i really cant find out what functions i need to use for it.
I thought there was a function to do something like this, but i could not find it...

Thanks in advance,
A newbie scripter


Re: Creating a stationary 'npc'? - Deal-or-die - 05.07.2012

Have you tried creating a NPC using
This Tutorial?


Re: Creating a stationary 'npc'? - doggeh - 05.07.2012

Do i really have to use a actual NPC for that?
I think its a bit.. overkill, but if there are no other ways...


Re: Creating a stationary 'npc'? - Deal-or-die - 05.07.2012

Hmm.. I think there are skin/model objects. pretty sure the ids of the objects are the same as the skin ids. You could try that if that is what you're after.


Re: Creating a stationary 'npc'? - doggeh - 05.07.2012

Just tried that, but its not working.

It does create some object (You can bump against it), but its invisible.


Re: Creating a stationary 'npc'? - doggeh - 06.07.2012

I have created one now with the NPC tutorial, but this NPC has a blip on the mini-map, and the other NPC (Which was already in the gamemode) does not ahve this blip, how can i remove it for that other NPC too?


Re: Creating a stationary 'npc'? - Roko_foko - 06.07.2012

ShowPlayerMarkers(0) under your OnGameModeInit


Re: Creating a stationary 'npc'? - doggeh - 06.07.2012

I still want to be able to see other players on the mini-map, just not the NPC which i added..


Re: Creating a stationary 'npc'? - Roko_foko - 06.07.2012

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
pawn Код:
new BOT_ID;
public OnPlayerConnect(playerid)
{
    new Name[MAX_PLAYER_NAME];
    if(IsPlayerNPC(playerid){
        GetPlayerName(Name,sizeof(Name),playerid)
        if(strcmp(Name,"BOT_NAME")==0)BOT_ID=playerid;
        }
    SetPlayerMarkerForPlayer(playerid,BOT_ID,0x00000000);
//rest code



Re: Creating a stationary 'npc'? - Grim_ - 06.07.2012

EDIT:

^ Dude be fast.