NPC won't connect
#1

I'm trying to make it so that an NPC connects to my server and do it's thing. The problem is that it won't connect.

pawn Код:
//NPC Script

#define RECORDING "Trader-Slab" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 2
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
pawn Код:
//The Filterscript that spawns the NPC

// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" NPC Script");
    print("--------------------------------------\n");
    ConnectNPC("TraderSlab","trader-slab");
    print("NPC 1 Loaded");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new npc_name[24];
        GetPlayerName(playerid, npc_name, sizeof(npc_name));
        if(!strcmp(npc_name,"TraderSlab",false))
        {
            SetPlayerSkin(playerid, 34);
        }
        return 1;
    }
    return 1;
}
Код:
//The server.cfg

echo Executing Server Config...
lanmode 0
rcon_password 
maxplayers 10
port 7777
hostname Test Server
gamemode0 fallout 1
filterscripts NPCFS
announce 0
query 1
weburl NULL
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 10
logtimeformat [%H:%M:%S]
plugins sscanf Whirlpool streamer
Anyone got any idea why it won't connect?
Reply


Messages In This Thread
NPC won't connect - by DTV - 02.08.2014, 05:34
Re: NPC won't connect - by IceBilizard - 02.08.2014, 05:41
Re: NPC won't connect - by DTV - 02.08.2014, 08:51
Re: NPC won't connect - by Threshold - 02.08.2014, 09:34
Re: NPC won't connect - by DTV - 02.08.2014, 13:21
Re: NPC won't connect - by DTV - 03.08.2014, 17:36
Re: NPC won't connect - by Threshold - 03.08.2014, 23:32
Re: NPC won't connect - by DTV - 03.08.2014, 23:35

Forum Jump:


Users browsing this thread: 1 Guest(s)