SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 22/07/2013, 05:41 PM   #1
Big Clucker
Join Date: Feb 2013
Posts: 113
Reputation: 2
Smile Passenger help


So i am trying to do a job where 2 people have to work.

so what i want is how can i get the passengers information

what i am trying to say is that if the a person gets a vehicle it will appeard a checkpoint only if the have the job (I already did that) what i want is that when the player enters that checkpoint i will check if there is a passenger and if so it will check if it has a the job and then it will appear another checkpoint

Everything I want if how the checkpoint can check the passengers information when the drivers enter that checkpoint
yancarlos4500 is offline   Reply With Quote
Old 22/07/2013, 06:22 PM   #2
Huge Clucker
lelemaster's Avatar
Join Date: Jul 2012
Posts: 263
Reputation: 17
Default Re : Passenger help

Those are basic codes, you'll need to adapt them to fit your script.

new found = 0;
new passengerid;
for(new i = 0; i<MAX_PLAYERS; i++)
	if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i) && GetPlayerVehicleSeat(i) == 1) // Seat 1 = co-driver
	    if(PlayerInfo[i][pJob] == yourjobid) // change my variable of PlayerInfo and pJob to fit your script
	    	found = 1;
	    	passengerid = i;
if(found == 0) return SendClientMessage(playerid, -1, "You have no passenger who works with you.");
// use passengerid for the player id of the passenger.

Last edited by lelemaster; 22/07/2013 at 08:32 PM.
lelemaster is offline   Reply With Quote
Old 22/07/2013, 11:41 PM   #3
Big Clucker
Join Date: Feb 2013
Posts: 113
Reputation: 2
Default Respuesta: Passenger help

thanks men i am going to try it
yancarlos4500 is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Passenger Drive By ScRipTeRi Filterscripts 5 11/07/2013 09:34 PM
Car Passenger does not TP with. Stefand Scripting Help 4 18/06/2013 08:45 AM
Get passenger? ajwar Help Archive 1 08/01/2011 04:56 PM
Teleport as passenger? WizardCM Help Archive 5 22/09/2010 01:21 PM
get passenger name? falor Help Archive 2 23/04/2010 03:14 PM

All times are GMT. The time now is 11:59 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.