Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: sseebbyy on March 18, 2012, 10:45:30 pm

Title: How to see if a player is passenger ?
Post by: sseebbyy on March 18, 2012, 10:45:30 pm
How to see if a player is passenger ?

"ispassenger" from OnPlayerEnterVehicle is bugged .

I need very much to see if is passenger or no ...
Title: Re: How to see if a player is passenger ?
Post by: Fuzzy168 on March 19, 2012, 05:32:12 am
[pawn]IsPlayerDriver_Passanger(playerid)[/pawn]
No documentation on this one but try it..
Title: Re: How to see if a player is passenger ?
Post by: sseebbyy on March 19, 2012, 10:20:04 pm
not work...
Title: Re: How to see if a player is passenger ?
Post by: DilsonTB on March 20, 2012, 01:53:58 pm
try this:

If IsPlayerDriver_Passanger(playerid) {
SendClientMessage(....................
}

Title: Re: How to see if a player is passenger ?
Post by: Morphine on March 20, 2012, 02:37:13 pm
Passenger*
Title: Re: How to see if a player is passenger ?
Post by: sseebbyy on March 20, 2012, 04:39:05 pm
try this:

If IsPlayerDriver_Passanger(playerid) {
SendClientMessage(....................
}

I tried with "(" and ")" first and nothing...

Code: [Select]
if(IsPlayerDriver_Passenger(playerid)) {
SendClientMessage(..............);
}

After this, I saw your post and i tried without "(" and ")" and ... nothing again.

Code: [Select]
error 001: expected token: "(", but found "-identifier-"
Title: Re: How to see if a player is passenger ?
Post by: Fuzzy168 on March 21, 2012, 03:11:22 pm
[pawn]if(IsPlayerDriver_Passenger(playerid)) {
SendClientMessage(..............);
}[/pawn]
Seriously? You put "...................."?
Title: Re: How to see if a player is passenger ?
Post by: sseebbyy on March 21, 2012, 08:30:36 pm
Hell no !

I don't put "......"

I know how work the functions.
Title: Re: How to see if a player is passenger ?
Post by: DilsonTB on March 21, 2012, 09:10:22 pm
ejejejeje i think its bugged :(
Title: Re: How to see if a player is passenger ?
Post by: sseebbyy on March 21, 2012, 09:25:06 pm
ejejejeje i think its bugged :(

ya.... and is essential for my Infected RPG ...  :(

However... zombies will be dissapointed
Title: Re: How to see if a player is passenger ?
Post by: aXXo on March 23, 2012, 02:55:31 pm
There is a way around it. Though it is not very exact.
OnPlayerEnterVehicle
Check if the vehicle is already occupied.
If it is, then the player is a passenger.
If not, then he is a driver.
Title: Re: How to see if a player is passenger ?
Post by: sseebbyy on March 23, 2012, 03:32:04 pm
There is a way around it. Though it is not very exact.
OnPlayerEnterVehicle
Check if the vehicle is already occupied.
If it is, then the player is a passenger.
If not, then he is a driver.

Hm.... is a good idea aXXo .

I know and what need in + for can be more exactly :D

i will try right now, i will come with edit when i will finish the test.

EDIT: Not work ...  :( ... or i made it wrong... if you know how, post here or give me a pm/mail
Title: Re: How to see if a player is passenger ?
Post by: [AoD]NC on March 24, 2012, 01:06:56 am
My idea:

So you want to check if someone is a passenger by a command for example. This command uses:
1. IsPlayerInAnyVehicle(playerid) to check if there is a need to execute the command. If yes:
2. GetPlayerVehicleID(playerid) to get the id, which will be saved somewhere.
3. Checks if the car ID was already saved by this command. If yes, two (or more) players are in the same vehicle, so there is one driver, one passenger or 2 passengers.
4. umumumumu?

Another idea:

Similar to previous example, you will save each players vehicle somewhere. It will be saved & checked when the player is entering the car.

So:
1. Player A enters the car (ID: 1). Script saves the car ID and checks, if the ID is saved already. No. So vehicle ID 1 is now occupied by a driver and saved.
2. Player B wants to enter the same car. Script saves and checks. ID 1 is already marked, so sorry for B, but you are the passenger!