help with npc's
#1

im trying to make a bot that walks to a destination and stays there but he doesnt appear and just stays were i spawn

my server.cfg

echo Executing Server Config...
lanmode 0
rcon_password snip like you need my rcon pass
maxplayers 500
port 7777
hostname AWSOME STUNTING AND DRIFTING
gamemode0 Untitled[WIP] 1
filterscripts ladmin4v2 announce PIRATE CarMenu_v1.1 adminmap
announce 1
query 1
weburl
mapname STUNTER
maxnpc 10
onfoot_rate 60
incar_rate 60
weapon_rate 60
stream_distance 50.0
stream_rate 50

the last entrie in my log



SA-MP Dedicated Server
----------------------
v0.3a R3, ©2005-2009 SA-MP Team

[17:35:28]
[17:35:28] Server Plugins
[17:35:28] --------------
[17:35:28] Loaded 0 plugins.

[17:35:28]
[17:35:28] Ban list
[17:35:28] --------
[17:35:28] Loaded: samp.ban
[17:35:28]
[17:35:28]
[17:35:28] Filter Scripts
[17:35:28] ---------------
[17:35:28] Loading filter script 'ladmin4v2.amx'...
[17:35:28]
________________________________________
[17:35:28] ________________________________________
[17:35:28] LAdmin Loading...
[17:35:28] ________________________________________
[17:35:28]
-Configuration Settings Loaded
[17:35:28] -41 Forbidden Names Loaded
[17:35:28] -10 Forbidden Tags Loaded
[17:35:28] -9 Forbidden Words Loaded
[17:35:28] ________________________________________
[17:35:28] LAdmin Version 4.0
[17:35:28] Loaded
[17:35:28] ________________________________________
[17:35:28] Date: 1/2/2010 Time: 17:35 :28
[17:35:28] ________________________________________
[17:35:28] ________________________________________

[17:35:28] Loading filter script 'announce.amx'...
[17:35:28] <|-----------------------------------------|>
[17:35:28] | .:[ - Announcement Messages FilterScript By Seif - ]:. |
[17:35:28] <|-----------------------------------------|>
[17:35:28] Loading filter script 'PIRATE.amx'...
[17:35:28] Loading filter script 'CarMenu_v1.1.amx'...
[17:35:28] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[17:35:29]
[17:35:29] => Car Selection Menu By Garsino Loaded! <=
[17:35:29]
[17:35:29] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[17:35:29] Loading filter script 'adminmap.amx'...
[17:35:29]
--------------------------------------
[17:35:29] ADMIN MAP BY JOHNATHON956
[17:35:29] --------------------------------------

[17:35:29] Loaded 5 filter scripts.

[17:35:29]
----------------------------------
[17:35:29] Blank Gamemode by your name here
[17:35:29] ----------------------------------

[17:35:29] Number of vehicle models: 16
[17:35:29] Incoming connection: 127.0.0.1:61812
[17:35:29] [npc:join] Drug_Dealer has joined the server (0:127.0.0.1)
Reply
#2

Tutorial -> Creating a new NPC
Reply
#3

Quote:
Originally Posted by mansonh
am i followed that and it didnt work

#include <a_samp>

#define YELLOW 0x2641FEAA

//------------------------------------------------------------------------------

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" ADMIN MAP BY JOHNATHON956");
print("--------------------------------------\n");
ConnectNPC("Drug_Dealer","Drug_Dealer");
CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
AddStaticVehicle(562,-81.5114,4857.3120,17.7608,180.2982,94,73); // admincar2
AddStaticVehicle(489,-77.7558,4857.5635,18.2448,180.4505
return 1;
}

public OnFilterScriptExit()
{
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, "Drug_Dealer", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, 400, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
//Other stuff for normal players goes here!
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/adminmap", cmdtext, true, 10) == 3)
{
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s has teleported to the ADMIN MAP!)",name);
SendClientMessage(playerid,YELLOW,string);
SetPlayerPos(playerid,-70.1664,4846.7148,25.7165);
SetPlayerFacingAngle(playerid,322.263;
return 1;
}
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)