SA-MP Forums Archive
BOTs leaving their vehicles!!!?? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: BOTs leaving their vehicles!!!?? (/showthread.php?tid=369615)



BOTs leaving their vehicles!!!?? - SampLoverNo123 - 17.08.2012

I have added few vehicle bots in my server, they just lose their cars after completing their recording 3-10 times, they just stand like theeey are nothing.. HELP ME TO GET THEM IN CAR FOR ALL DAY AND NIGHT UNTILL SERVER STOPSSS


Re: BOTs leaving their vehicles!!!?? - Admigo - 17.08.2012

Show the code?


Re: BOTs leaving their vehicles!!!?? - SampLoverNo123 - 17.08.2012

It is normal code, this code i got for npcmode:

#define RECORDING "Bob"
#define RECORDING_TYPE 1


#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


Re: BOTs leaving their vehicles!!!?? - [EnErGyS]KING - 17.08.2012

Filescript ?


Re: BOTs leaving their vehicles!!!?? - SampLoverNo123 - 17.08.2012

It is just for bob.amx that is placed in npcmodes folders


Re: BOTs leaving their vehicles!!!?? - [EnErGyS]KING - 17.08.2012

FOr bots you need Filescript and npcmodes script. I see you npc modes script. SO WHERE IS FILESCRIPT....


Re: BOTs leaving their vehicles!!!?? - SampLoverNo123 - 17.08.2012

I added bots in my gamemode


Re: BOTs leaving their vehicles!!!?? - [EnErGyS]KING - 17.08.2012

so can you show lines ? Not GM Just show NPC lines


Re: BOTs leaving their vehicles!!!?? - SampLoverNo123 - 17.08.2012

On game mode init
Код:
    ConnectNPC("Dave","Dave");
	ConnectNPC("Jack","Jack");
	ConnectNPC("Bob","Bob");
	ConnectNPC("Ron","Ron");
	ConnectNPC("Josh","Josh");
	ConnectNPC("Crazydog","Crazydog");
	ConnectNPC("Crazyman","Crazyman");
	ConnectNPC("Jimmy","Jimmy");
MyFirstNPCVehicle = CreateVehicle (561, 0.0, 0.0, 0.5,  0.0, 3, 3, 5000);
	Bob = CreateVehicle (420, 0.0, 0.0, 0.5,  0.0, 6, 6, 5000);
	Jack = CreateVehicle (546, 0.0, 0.0, 0.5,  0.0, 7, 7, 5000);
	Ron = CreateVehicle (420, 0.0, 0.0, 0.5,  0.0, 6, 6, 5000);
	Josh = CreateVehicle (420, 0.0, 0.0, 0.5,  0.0, 6, 6, 5000);
	Crazydog = CreateVehicle (522, 0.0, 0.0, 0.5,  0.0, 1, 0, 5000);
	Crazyman = CreateVehicle (522, 0.0, 0.0, 0.5,  0.0, 1, 0, 5000);
	Jimmy = CreateVehicle (463, 0.0, 0.0, 0.5,  0.0, 6, 0, 5000);
	Botinfo = Create3DTextLabel("Civilian", COLOR_LIGHTBLUE, 0.0, 0.0, 0.0, 30.0,0);
	Bobcolor = Create3DTextLabel("Bob [ Taxi Driver ]", COLOR_YELLOW, 0.0, 0.0, 0.0, 30.0,0);
	Roncolor = Create3DTextLabel("Ron [ Taxi Driver ]", COLOR_YELLOW, 0.0, 0.0, 0.0, 30.0,0);
	Joshcolor = Create3DTextLabel("Josh [ Taxi Driver ]", COLOR_YELLOW, 0.0, 0.0, 0.0, 30.0,0);
	Crazydogcolor = Create3DTextLabel("CrazyDog [ Newbie services ]", COLOR_PURPLE, 0.0, 0.0, 0.0, 30.0,0);
	Crazymancolor = Create3DTextLabel("CrazyMan [ Newbie services ]", COLOR_PURPLE, 0.0, 0.0, 0.0, 30.0,0);
	Jimmycolor = Create3DTextLabel("Jimmy the biker [ Newbie services ]", COLOR_PURPLE, 0.0, 0.0, 0.0, 30.0,0);
On player spawn,
pawn Код:
if(IsPlayerNPC(playerid))
        {
        GetPlayerName(playerid, npcname, sizeof(npcname));
        SetPlayerSkin(playerid, 7);
        if(!strcmp(npcname, "Dave",true))
        {
        PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
        SetPlayerSkin(playerid, 7);
        }
        if(!strcmp(npcname, "Dave",true))
        {
        Attach3DTextLabelToPlayer(Botinfo, playerid, 0.0, 0.0,0.0);
        }
        if(!strcmp(npcname, "Bob",true))
        {
        SetPlayerSkin(playerid, 7);
        PutPlayerInVehicle(playerid, Bob, 0);
        }
        if(!strcmp(npcname, "Bob",true))
        {
        Attach3DTextLabelToPlayer(Bobcolor, playerid, 0.0, 0.0,0.0);
        }
        if(!strcmp(npcname, "Ron",true))
        {
        SetPlayerSkin(playerid, 7);
        PutPlayerInVehicle(playerid, Ron, 0);
        }
        if(!strcmp(npcname, "Ron",true))
        {
        Attach3DTextLabelToPlayer(Roncolor, playerid, 0.0, 0.0,0.0);
        }
        if(!strcmp(npcname, "Josh",true))
        {
        SetPlayerSkin(playerid, 7);
        PutPlayerInVehicle(playerid, Josh, 0);
        }
        if(!strcmp(npcname, "Josh",true))
        {
        Attach3DTextLabelToPlayer(Joshcolor, playerid, 0.0, 0.0,0.0);
        }
        if(!strcmp(npcname, "Crazyman",true))
        {
        SetPlayerSkin(playerid, 7);
        PutPlayerInVehicle(playerid, Crazyman, 0);
        }
        if(!strcmp(npcname, "Crazyman",true))
        {
        Attach3DTextLabelToPlayer(Crazymancolor, playerid, 0.0, 0.0,0.0);
        }
        if(!strcmp(npcname, "Jimmy",true))
        {
        SetPlayerSkin(playerid, 7);
        PutPlayerInVehicle(playerid, Jimmy, 0);
        }
        if(!strcmp(npcname, "Jimmy",true))
        {
        Attach3DTextLabelToPlayer(Jimmycolor, playerid, 0.0, 0.0,0.0);
        }
        if(!strcmp(npcname, "Crazydog",true))
        {
        SetPlayerSkin(playerid, 7);
        PutPlayerInVehicle(playerid, Crazydog, 0);
        }
        if(!strcmp(npcname, "Crazydog",true))
        {
        Attach3DTextLabelToPlayer(Crazydogcolor, playerid, 0.0, 0.0,0.0);
        }
        if(!strcmp(npcname, "Jack",true))
        {
        SetPlayerSkin(playerid, 7);
        PutPlayerInVehicle(playerid, Jack, 0);
        }
        if(!strcmp(npcname, "Jack",true))
        {
        Attach3DTextLabelToPlayer(Botinfo, playerid, 0.0, 0.0,0.0);
        }
        return 1;
        }



Re: BOTs leaving their vehicles!!!?? - [EnErGyS]KING - 17.08.2012

It's Maybe That Bots names and Cars the same ?