Npc Bots 0.3.7
#1

Can anyone tell me how to add npc bots in samp 0.3.7 ?
I saw all tutorials but they are outdated
Reply
#2

Same as the other versions....
Reply
#3

Quote:
Originally Posted by ammaz
Посмотреть сообщение
Can anyone tell me how to add npc bots in samp 0.3.7 ?
I saw all tutorials but they are outdated
Are you referring to NPCs or actors? NPCs were added in 0.3a version, however actors were added recently, in the 0.3.7 version and are different from NPCs.
Reply
#4

Quote:
Originally Posted by Michael B
Посмотреть сообщение
Are you referring to NPCs or actors? NPCs were added in 0.3a version, however actors were added recently, in the 0.3.7 version and are different from NPCs.
I am referring to NPCs, But the main part is all codes are fine, they dont give any error but NPCs dont connect into my server. This is the exact coding I used https://sampforum.blast.hk/showthread.php?tid=95034
Reply
#5

Please help me anyone
Reply
#6

Quote:
Originally Posted by ammaz
Посмотреть сообщение
Please help me anyone
Use filterscripts to make nps
Reply
#7

Have you max_npc setted in server.cfg?
It can't be 0.
Reply
#8

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

Should work just fine.
Make sure in your server.cfg you have max_npc set to the amount of NPCs you have.
Reply
#9

max_npc 1

Sorry i am newbie in making filterscript.
This is the code. Please tell me how to fix it

Quote:

#include <a_samp>
#include <a_npc>


#if defined FILTERSCRIPT

new crazyVehicle; //Global variable!

public OnFilterScriptInit()
{
print("Bots");
ConnectNPC("crazy","pilot");
crazyVehicle = CreateVehicle(476, 0.0, 0.0, 5.0, 0.0, 226, 1, 5000);
return 1;
}

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, "crazy", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, crazyVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
}

#endif

No NPC connects into my server.
Reply
#10

Please help me guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)