07.03.2013, 02:22
I'm working on a project and I can't seem to get the damn NPCs to connect.
Server.cfg:
Mini script:
npc1.pwn is in scriptfiles/npcmodes, npc1.rec is in scriptfiles/npcmodes/recordings
GameModeInit:
What am I doing wrong?
Server.cfg:
Quote:
echo Executing Server Config... lanmode 0 rcon_password *** maxplayers 50 port 7777 hostname *** gamemode0 *** filterscripts vspawner announce 1 plugins sscanf streamer query 1 chatlogging 0 weburl www.sa-mp.com onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000 maxnpc 5 logtimeformat [%H:%M:%S] |
pawn Код:
#define RECORDING "npc1" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#if RECORDING_TYPE == 1
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
GameModeInit:
pawn Код:
public OnGameModeInit ( )
{
SetGameModeText ( "***" );
ConnectNPC ( "npc1", "npc1" );
ConnectNPC ( "at400_ls", "at400_ls" ); // Tried testing with this - still no luck!
AddPlayerClass ( 0, 0.0, 10.0, 0.0, 0.0, 4, 1, 24, 50000, 30, 50000 );
NPCHelicopter = CreateVehicle ( 503, -316.2008, 1053.3335, 20.3403, 0.0, 6, 3, 5000 );
return true;
}