#1

Hello!

How do i add a standing bot in a GM?
Reply
#2

Npc tutorial:

https://sampforum.blast.hk/showthread.php?tid=95034
Reply
#3

[QUOTE=Stigg;1237793]Npc tutorial:
Thanks! but it doesnt work.
Reply
#4

[quote=cruising;1237855]
Quote:
Originally Posted by Stigg
Посмотреть сообщение
Npc tutorial:
Thanks! but it doesnt work.
Have you followed the tutorial properly ?
I would suggest you start again or retrace your steps because there's nothing wrong with the tutorial.
It work's perfectly.
Reply
#5

[quote=Stigg;1237860]
Quote:
Originally Posted by cruising
Посмотреть сообщение
Have you followed the tutorial properly ?
I would suggest you start again or retrace your steps because there's nothing wrong with the tutorial.
It work's perfectly.
The bot join and all is fine, but he doesnt show up at the point i was standing when recorded.
i have tried put if(IsPlayerNPC(playerid)) return 1; on login, spawn,register etc, still no bot.
Reply
#6

Did you change the type from 1 to 2?

pawn Код:
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
Reply
#7

Quote:
Originally Posted by Tee
Посмотреть сообщение
Did you change the type from 1 to 2?

pawn Код:
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
No i had not change that, its always something i miss -_-
Thanks!
Reply
#8

No problem.
Reply
#9

Quote:
Originally Posted by Tee
Посмотреть сообщение
No problem.
Any way to change skin on him?
Reply
#10

pawn Код:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
    if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
    {
      SetPlayerSkin(playerid,put_the_skin_ID_here);
    }
    return 1;
  }
  //Other stuff for normal players goes here!
  return 1;
}
Example:

pawn Код:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
    if(!strcmp(npcname, "crusing", true)) //Checking if the NPC's name is MyFirstNPC
    {
      SetPlayerSkin(playerid,0);//CJ skin
    }
    return 1;
  }
  //Other stuff for normal players goes here!
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)