SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 09/10/2010, 11:35 AM   #1
CrucixTM
Huge Clucker
 
CrucixTM's Avatar
 
Join Date: Jan 2010
Location: Denmark
Posts: 293
Reputation: 7
Default NPC Issue.

I recorded an NPC that stands still, recording named "GateGuard".

I moved that file to npcmodes\recordings

Made a pawno script in npcmodes directory with only the following:

pawn Code:
#define RECORDING "GateGuard" //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 == 1
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif

And I added this in my gamemode:

pawn Code:
public OnGameModeInit()
{
    // General
   
    blabla
   
   
    // NPCs
   
    ConnectNPC("Sergeant_Wyatt","GateGuard");

And I put

pawn Code:
if(IsPlayerNPC(playerid)) return 1;

under OnPlayerConnect, OnPlayerRequestClass, OnPlayerRequestSpawn, OnPlayerSpawn.

Still, my NPC does not show up. The server log says:



And the server appears empty.

Any help please? I followed this tutorial: http://forum.sa-mp.com/showthread.php?t=95034 - I don't wanna bump that, however.
__________________
Experienced mapper - Mapping anything for as low as 1 Euro(€)! - PM me if you need something mapped properly!
CrucixTM is offline  
Old 09/10/2010, 11:38 AM   #2
mmrk
Big Clucker
 
Join Date: Nov 2008
Location: Estonia
Posts: 120
Reputation: 0
Default Re: NPC Issue.

If bot joins he takes one slot
Example:
If you have 100 slots server and you add one bot then your slots would be 0/99
mmrk is offline  
Old 09/10/2010, 11:45 AM   #3
CrucixTM
Huge Clucker
 
CrucixTM's Avatar
 
Join Date: Jan 2010
Location: Denmark
Posts: 293
Reputation: 7
Default Re: NPC Issue.

Quote:
Originally Posted by mmrk View Post
If bot joins he takes one slot
Example:
If you have 100 slots server and you add one bot then your slots would be 0/99
Well, my server is set to 3 slots. That would make it 2. But it stays at 3. In other words, the bot can't connect, or what?

Here's my server.cfg if that helps:

Code:
echo Executing Server Config...
lanmode 1
rcon_password -Edited out-
maxplayers 3
port 7777
hostname Test
gamemode0 CSRP 1
filterscripts
plugins streamer
announce 0
query 1
weburl smouch.net/lol
__________________
Experienced mapper - Mapping anything for as low as 1 Euro(€)! - PM me if you need something mapped properly!
CrucixTM is offline  
Old 09/10/2010, 11:48 AM   #4
CrucixTM
Huge Clucker
 
CrucixTM's Avatar
 
Join Date: Jan 2010
Location: Denmark
Posts: 293
Reputation: 7
Default Re: NPC Issue.

I fixed it never mind. :P

I forgot
Code:
maxnpc 20
In server.cfg.
__________________
Experienced mapper - Mapping anything for as low as 1 Euro(€)! - PM me if you need something mapped properly!
CrucixTM is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with; | value | value |value | boelie Help Archive 2 03/08/2009 04:08 PM
Big ol' issue. Coy Gibbs Client Support 6 12/07/2009 10:04 PM
Cmd issue Shinzei_Banzai Help Archive 14 07/07/2009 06:08 PM
SA-MP Issue PT_HoMiE Client Support 8 19/04/2009 07:01 AM


All times are GMT. The time now is 09:28 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.