Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started 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 ...
-
[pawn]IsPlayerDriver_Passanger(playerid)[/pawn]
No documentation on this one but try it..
-
not work...
-
try this:
If IsPlayerDriver_Passanger(playerid) {
SendClientMessage(....................
}
-
Passenger*
-
try this:
If IsPlayerDriver_Passanger(playerid) {
SendClientMessage(....................
}
I tried with "(" and ")" first and nothing...
if(IsPlayerDriver_Passenger(playerid)) {
SendClientMessage(..............);
}
After this, I saw your post and i tried without "(" and ")" and ... nothing again.
error 001: expected token: "(", but found "-identifier-"
-
[pawn]if(IsPlayerDriver_Passenger(playerid)) {
SendClientMessage(..............);
}[/pawn]
Seriously? You put "...................."?
-
Hell no !
I don't put "......"
I know how work the functions.
-
ejejejeje i think its bugged :(
-
ejejejeje i think its bugged :(
ya.... and is essential for my Infected RPG ... :(
However... zombies will be dissapointed
-
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.
-
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
-
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!