how to make a NPC to just stand?
#4

Quote:
Originally Posted by Wizzy951
Посмотреть сообщение
Create a new npcmode (in the npcmodes folder and compile it) for instance lets call it idlemedic. It should contain:
pawn Код:
#include <a_npc>
main(){}
Now go to your gamemode/fs and add the following things:
pawn Код:
//under ongamemode/filterscriptinit
ConnectNPC("Medic[BOT]","idlemedic");//Medic[BOT] stands for his name and idlemedic for the script name

//under onplayerspawn
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Medic[BOT]", true))
    {
      //Here you set his position, interior and whatever you want
    }
    return 1;
    }

//here continues your code in the onplayerspawn callback
P.S: It's not tested so if you encounter some issues you can pm me.
it dont show
Reply


Messages In This Thread
how to make a NPC to just stand? - by UserName31 - 25.07.2014, 20:43
Re: how to make a NPC to just stand? - by Crayder - 25.07.2014, 21:11
Re: how to make a NPC to just stand? - by Wizzy951 - 25.07.2014, 21:14
Re: how to make a NPC to just stand? - by UserName31 - 25.07.2014, 21:34
Re: how to make a NPC to just stand? - by Crayder - 25.07.2014, 21:47
Re: how to make a NPC to just stand? - by Clad - 25.07.2014, 21:50
Re: how to make a NPC to just stand? - by UserName31 - 25.07.2014, 22:06
Re: how to make a NPC to just stand? - by UserName31 - 25.07.2014, 22:12

Forum Jump:


Users browsing this thread: 1 Guest(s)