bots completely gone...
#1

hey everyone,

so i had 3 bots in my server for my lounge, to make it a bit more look like a disco there, but now when i created the fourth one, and added it, restarted the server, and it all worked fine, then restarting server again, and ALL dissapeared... and i didnt change anything in the script or wutsoever...

ongamemodeinit
pawn Код:
ConnectNPC("Katy_Perry", "LoungeOne");
    ConnectNPC("Chuck_Norris", "LoungeTwo");
    ConnectNPC("Nicki_Minaj", "LoungeThree");
    ConnectNPC("Bruno_Mars", "LoungeFour");
onplayerspawn
pawn Код:
if(IsPlayerNPC(playerid))
    {
        new botname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, botname, sizeof(botname));
        if(!strcmp(botname, "Katy_Perry", true)) //Kijken of de naam klopt
        {
            SetPlayerSkin(playerid, 93);
            ResetPlayerWeapons(playerid);
            return 1;
        }
        else if(!strcmp(botname, "Chuck_Norris", true)) //Kijken of de naam klopt
        {
            SetPlayerSkin(playerid, 189);
            ResetPlayerWeapons(playerid);
            return 1;
        }
        else if(!strcmp(botname, "Nicki_Minaj", true)) //Kijken of de naam klopt
        {
            SetPlayerSkin(playerid, 139);
            ResetPlayerWeapons(playerid);
            return 1;
        }
        else if(!strcmp(botname, "Bruno_Mars", true)) //Kijken of de naam klopt
        {
            SetPlayerSkin(playerid, 84);
            ResetPlayerWeapons(playerid);
            return 1;
        }
        return 1;
    }
the problem occured when i added the "Bruno_Mars" bot...

ncpmodes script of the Bruno Mars bot:
pawn Код:
#define RECORDING "LoungeBotFour" //Dit is de bestandsnaam van je opgenomen bestand, zonder extensie!
#define RECORDING_TYPE 2 //1 Voor in een voertuig en 2 voor te voet.

#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
server.cfg:
Код:
echo Executing Server Config...
lanmode 1
rcon_password nielsenruben
maxplayers 104
port 7777
hostname StreetRodZ - Real Life StreetRacing
gamemode0 HighSpeedDrivers 
filterscripts nRace gCamera R_Speedov2 PPC_Housing PPC_Business InCar grider CarCMD CarWheelie GarPM AFK
announce 1
plugins sscanf streamer
query 1
weburl www.streetrodzracers.tk
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 4
logtimeformat [%H:%M:%S]
so how can it be that the bots completely dont join? there isnt even a connecting to... not even that, just the last line is: number of vehicle models: 47...

anyone knows the problem?

ow also, as you can see i did ResetPlayerWeapons, but that aint working... the bots still have their weapons, how can i make the weapons go away for them? cuz at normal players ResetPlayerweapons DOES works...

greets niels
Reply
#2

In server.cfg, set maxnpc to 5 or something higher...
Reply
#3

The name of the recorded path you have at the moment is
pawn Код:
ConnectNPC("Bruno_Mars", "LoungeFour");
In the miniscript it's
pawn Код:
#define RECORDING "LoungeBotFour"
Make sure that the names are same.
pawn Код:
ConnectNPC("Bruno_Mars", "LoungeBotFour");
Also, the type is 2 (0n vehicle), you should create it.
Reply
#4

eehm, no the recording is the thingy thats the recording, so the .rec file, which is in recordings folder, and in the gamemode it asks for the FILE that is in npcmodes folder, which is called LoungeFour, and NOT LoungeBotFour.

also the type 2 is for onfoot:
https://sampwiki.blast.hk/wiki/Recordingtypes

so that cant be the problem neither...

and i just tried to set the maxnpc to 10, but didnt make any difference... anyone has a solution of why this bots are sudden gone...
Reply
#5

Anyway, read this tutorial and check the common problems at the bottom.
Reply
#6

checked it, and none of them fit to mine, i DO have isplayernpc and spawn and connect and requestclass and everywhere neccesary, and i also DO have added maxnpc to 10, also my server isnt passworded...




anyone got an option how to fix this? please?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)