//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
//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
https://sampwiki.blast.hk/wiki/NPC:ConnectNPC
for more info check this https://sampforum.blast.hk/showthread.php?tid=102878 |
#define RECORDING "Trader-Slab"
ConnectNPC("TraderSlab","trader-slab");
pawn Код:
|
And you have definitely uploaded both the NPC script AND the recording in the 'npcmodes' folder?
|