SA-MP Forums Archive
Busbot - 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: Busbot (/showthread.php?tid=347333)



Busbot - FreshDiddi - 01.06.2012

Hi, sorry for my bad english (I'm German). But that's my question: I've created a Busbot. but if a player is busbot before he is to stand still. please help me ^^


Re: Busbot - MadeMan - 01.06.2012

Quote:
Originally Posted by FreshDiddi
Посмотреть сообщение
... but if a player is busbot before he is to stand still ...
Can you explain that part again?


AW: Busbot - FreshDiddi - 01.06.2012

if a player is before a busbot, the bus cant move forward.
i hope you can understand this ^^


Re: Busbot - MadeMan - 01.06.2012

You want the bus to drive over the player?

Show your bus NPC script.


AW: Busbot - FreshDiddi - 01.06.2012

No xDD i want the bus not to drive over the player xD

over the script
Код:
new car_Busbot;
OnGameModeInit
Код:
//Busbot
ConnectNPC("busbot","busbot");
car_Busbot = CreateVehicle(437, -2257.1030,149.2979,35.3796,181.1235,1,7, -1);
OnPlayerSpawn
Код:
if(IsPlayerNPC(playerid))
    {
		new botname[MAX_PLAYER_NAME];
		GetPlayerName(playerid, botname, sizeof(botname));
		if(!strcmp(botname, "busbot", true))
		{
		    Desktop_Check[playerid] = 0;
			Desktop_Timer_Started[playerid] = 0;
		    Desktop_Status[playerid] = 0;
		    print("[NPC]: Busbot ist gespawnt.");
 			SetPVarInt(playerid,"Fuehrerschein",1);
 			SetPlayerSkin(playerid,255);
 			PutPlayerInVehicle(playerid, car_Busbot, 0);
 			GetVehicleParamsEx(car_Busbot,engine,lights,alarm,doors,bonnet,boot,objective);
			SetVehicleParamsEx(car_Busbot,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
			Motor[car_Busbot] = true;
			Vehicle[car_Busbot][Engine] = 1;
			return 1;
		}
 	}



Re: Busbot - MadeMan - 01.06.2012

I mean the NPC script, the busbot.pwn in npcmodes folder.


AW: Busbot - FreshDiddi - 01.06.2012

Код:
#include "a_npc"
#define RECORDING "busbot"

main()
{
}

public OnRecordingPlaybackEnd()
{
	StartRecordingPlayback(1, RECORDING); 
}

public OnNPCEnterVehicle(vehicleid, seatid)
{
	StartRecordingPlayback(1, RECORDING);
}
public OnNPCExitVehicle()
{
	StopRecordingPlayback();
}



Re: Busbot - MadeMan - 01.06.2012

Use the taxi_ls_test.pwn script (comes with SA-MP server package).

Just change the recording name in StartPlayback()

pawn Код:
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"busbot");



Re: Busbot - Sandiel - 01.06.2012

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
You want the bus to drive over the player?
OH MY GOD, loool, I seriously laughed out loud, OMG this is so fucking hilarious!


AW: Busbot - FreshDiddi - 01.06.2012

Boah thank you very much ^^