19.01.2010, 16:53
Hello,
I have 2 bots on my server. The first bot shows up and works fine. The second bot doesn't. What these bots do is they drive around San Fierro in a bus. When I connect to my server I spawn inside the second bus at the farm of blueberry
I really don't know how to fix this so I am posting the commandlines here:
On Top
OnGameModeInIt
OnPlayerConnect
OnPlayerDisconnect
OnPlayerSpawn
Please Someone help me
I am really stuck here 
Thank you
I have 2 bots on my server. The first bot shows up and works fine. The second bot doesn't. What these bots do is they drive around San Fierro in a bus. When I connect to my server I spawn inside the second bus at the farm of blueberry

I really don't know how to fix this so I am posting the commandlines here:
On Top
Код:
new Text3D:BusLine1; new Text3D:BusLine2; new MyFirstNPCVehicle; new MySecondNPCVehicle;
Код:
ConnectNPC("SanFierroBus1","SanFierroBus1");
ConnectNPC("SanFierroBus2","SanFierroBus2");
MyFirstNPCVehicle = CreateVehicle(437, 0.0, 0.0, 5.0, 0.0, 16, 83, 5000);
MySecondNPCVehicle = CreateVehicle(437, 0.0, 0.0, 5.0, 0.0, 16, 83, 5000);
Код:
BusLine1 = Create3DTextLabel("[BUS] Line 1",0xFFFFFFFF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToVehicle(Text3D:BusLine1, MyFirstNPCVehicle, 0.0, 0.0, 1.0);
BusLine2 = Create3DTextLabel("[BUS] Line 2",0xFFFFFFFF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToVehicle(Text3D:BusLine2, MySecondNPCVehicle, 0.0, 0.0, 1.0);
Код:
Delete3DTextLabel(BusLine1); Delete3DTextLabel(BusLine2);
Код:
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "SanFierroBus1", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
new npcname[MAX_PLAYER_NAME];
if(!strcmp(npcname, "SanFierroBus2", true))
{
PutPlayerInVehicle(playerid, MySecondNPCVehicle, 0);
return 1;
}
SetPlayerPos(playerid, -2069.225,-88.073,35.647);
I am really stuck here 
Thank you

