SA-MP Forums Archive
Help Programming a Garage using Checkpoints - 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: Help Programming a Garage using Checkpoints (/showthread.php?tid=322198)



Help Programming a Garage using Checkpoints - Ricey - 01.03.2012

Hello Everybody.

I'm Trying to Script my Police Garage using a Checkpoint.
Althought, I'm Unsure of How i Go About Doing This Type of Thing.

This is What I've Thought of Doing.

Код:
	if(getCheckpointID(playerid) == CP_POLICE_GARAGE)
	{
             //Check Player is in a Vehicle (IsPlayerInAnyVehicle) else Return a Message "you need a vehicle".
		{
                        //Show a DIALOG_STYLE_LIST
			return 1;
		}
Could Anyone Give me an Example Script?


Re: Help Programming a Garage using Checkpoints - Ricey - 03.03.2012

Bump -.-


Re: Help Programming a Garage using Checkpoints - niels44 - 03.03.2012

i recommend you to use the scripting machine for the dialog, thats the most fast way of how you want your dialog and then you can make it as how you like it
and for the thing of checking vehicle use this:
pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, red, "ERROR: you are not in a vehicle");
else if(IsPlayerInAnyVehicle(playerid))
{
// your code with dialog here
return 1;
}
EDIT: here is the scripting machine link:http://forum.sa-mp.com/showthread.ph...ipting+machine