SA-MP Forums Archive
Change NPC id? - 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: Change NPC id? (/showthread.php?tid=127442)



Change NPC id? - bajskorv123 - 13.02.2010

Hey, I have somewhere around 13 NPC's on my server, and when I join, I get ID 13 when i want id 0.
Is there any way to move the npcs so they get id 487 to 500 or something?

EDIT: It should be like a SetPlayerID(playerid, id) function


Re: Change NPC id? - dice7 - 13.02.2010

you can't


Re: Change NPC id? - Joe Staff - 13.02.2010

Quote:
Originally Posted by dice7
you can't
Not entirely true.
At OnGameModeInit, you can connect 50 'blank' NPCs, then connect your NPCs, then kick off the 'blank' NPCs


Re: Change NPC id? - Joe Staff - 13.02.2010

It's yours :P


Re: Change NPC id? - bajskorv123 - 13.02.2010

Quote:
Originally Posted by Seif_
Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by dice7
Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by [NWA
Hannes ]
Hey, I have somewhere around 13 NPC's on my server, and when I join, I get ID 13 when i want id 0.
Is there any way to move the npcs so they get id 487 to 500 or something?

EDIT: It should be like a SetPlayerID(playerid, id) function
you can't
Not entirely true.
At OnGameModeInit, you can connect 50 'blank' NPCs, then connect your NPCs, then kick off the 'blank' NPCs
Brilliant idea, this could actually create SetPlayerID.
It's yours :P
How to connect blank npcs?
I really need this


Re: Change NPC id? - Joe Staff - 13.02.2010

pawn Код:
public OnGameModeInit()
{
  new blanknpcamount;
  for(new playerid;playerid<GetMaxPlayers()-AMOUNTOFNPCS;playerid++) //Change AMOUNTOFNPCS to be the same of NPCs you plan on connecting
  {
    ConnectNPC("Jimbo","BLANK");
    blanknpcamount++;
  }
  //ConnectNPCs here
  for(new playerid;playerid<blanknpcamount;playerid++)Kick(playerid);
  return 1;
}



Re: Change NPC id? - bajskorv123 - 13.02.2010

Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by [NWA
Hannes ]
Quote:
Originally Posted by Seif_
Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by dice7
Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by [NWA
Hannes ]
Hey, I have somewhere around 13 NPC's on my server, and when I join, I get ID 13 when i want id 0.
Is there any way to move the npcs so they get id 487 to 500 or something?

EDIT: It should be like a SetPlayerID(playerid, id) function
you can't
Not entirely true.
At OnGameModeInit, you can connect 50 'blank' NPCs, then connect your NPCs, then kick off the 'blank' NPCs
Brilliant idea, this could actually create SetPlayerID.
It's yours :P
How to connect blank npcs?
I really need this
pawn Код:
public OnGameModeInit()
{
  new blanknpcamount;
  for(new playerid;playerid<GetMaxPlayers()-AMOUNTOFNPCS;playerid++) //Change AMOUNTOFNPCS to be the same of NPCs you plan on connecting
  {
    ConnectNPC("Jimbo","BLANK");
    blanknpcamount++;
  }
  //ConnectNPCs here
  for(new playerid;playerid<blanknpcamount;playerid++)Kick(playerid);
  return 1;
}
Please explain more in detail


Re: Change NPC id? - bajskorv123 - 14.02.2010

Bump
I really need that explained so i can use it


Re: Change NPC id? - bajskorv123 - 26.02.2010

Quote:
Originally Posted by Joe Staff
pawn Код:
public OnGameModeInit()
{
  new blanknpcamount;
  for(new playerid;playerid<GetMaxPlayers()-AMOUNTOFNPCS;playerid++)
  {
    ConnectNPC("Jimbo","BLANK");
    blanknpcamount++;
  }
  //ConnectNPCs here
  for(new playerid;playerid<blanknpcamount;playerid++)Kick(playerid);
  return 1;
}
Please explain more on how to use, i dont get it


Re: Change NPC id? - Sergei - 26.02.2010

You will need to set different name for each NPC tho'.