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



onplayerentervehicle - PaulDinam - 27.09.2012

What is the problem it's not working..

This code is inside a filterscript .

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(ispassenger == 0)
	{
		if(vehicleid == 448)
		{
			SendClientMessage(playerid, COLOR_YELLOW, "Welcome to the PizzaBike mission!");
			SendClientMessage(playerid, COLOR_YELLOW, "All the credits goes to Paul Diamant.");
			ShowPlayerDialog(playerid, DIALOG_PIZZA_START, 0, "Pizza Mission", "Welcome to the Huge pizza mission,\nTo start your mission HIT Start\nTo quit HIT leave", "Start", "Leave");
		}
	}
	return 1;
}



Re: onplayerentervehicle - Vince - 27.09.2012

https://sampwiki.blast.hk/wiki/GetVehicleModel


Re: onplayerentervehicle - PaulDinam - 27.09.2012

i have another problem after it happend the vehicle does not respawn...

Код:
if(newstate == PLAYER_STATE_ONFOOT && isDelivering[playerid] == 1)
	{
		new playerveh = GetPlayerVehicleID(playerid);
		SendClientMessage(playerid, COLOR_NEWS, "You left your bike, and failed the mission");
		DisablePlayerCheckpoint(playerid);
		isDelivering[playerid] = 0;
		LCP[playerid] = 0;
		KillTimer(pizzatimer[playerid]);
		TextDrawSetString(Textdraw38[playerid], "");
		TogglePlayerControllable(playerid, 1);
		TextDrawHideForPlayer(playerid,Textdraw38[playerid]);
		
		
		PutPlayerInVehicle(playerid, playerveh, 0);
		TogglePlayerControllable(playerid,1);
		SetVehicleToRespawn(playerveh);
	}



Re: onplayerentervehicle - mamorunl - 28.09.2012

You made a new topic for that last post already. You could've just waited for a reply as this topic is still on the first page.