Author Topic: How to see if a player is passenger ?  (Read 5741 times)

0 Members and 1 Guest are viewing this topic.

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
How to see if a player is passenger ?
« 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 ...

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: How to see if a player is passenger ?
« Reply #1 on: March 19, 2012, 05:32:12 am »
[pawn]IsPlayerDriver_Passanger(playerid)[/pawn]
No documentation on this one but try it..
I'm beginning to feel like a Lag God, Lag God

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How to see if a player is passenger ?
« Reply #2 on: March 19, 2012, 10:20:04 pm »
not work...

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline DilsonTB

  • Made Man
  • ***
  • Posts: 140
  • VC:MP Developer. & SA:MP Currently Developer
    • View Profile
Re: How to see if a player is passenger ?
« Reply #3 on: March 20, 2012, 01:53:58 pm »
try this:

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

_______________________________________________
¬ VC:MP Squirrel Developer.
¬ VC:MP pawno Developer.
¬ SA:MP Developer.
¬
¬ Actually developing " San Fierro Roleplay - Latino ", with
my beta team testers, Mapper + Scripter ( me ), 18,000
lines, and is 34% finished. hope to finish it in 4 Or 3 Months.

- MYSQL FULL BASED.
- PCU.
_______________________________________________

Offline Morphine

  • Made Man
  • ***
  • Posts: 109
    • View Profile
Re: How to see if a player is passenger ?
« Reply #4 on: March 20, 2012, 02:37:13 pm »
Passenger*

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How to see if a player is passenger ?
« Reply #5 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-"

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: How to see if a player is passenger ?
« Reply #6 on: March 21, 2012, 03:11:22 pm »
[pawn]if(IsPlayerDriver_Passenger(playerid)) {
SendClientMessage(..............);
}[/pawn]
Seriously? You put "...................."?
I'm beginning to feel like a Lag God, Lag God

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How to see if a player is passenger ?
« Reply #7 on: March 21, 2012, 08:30:36 pm »
Hell no !

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

I know how work the functions.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline DilsonTB

  • Made Man
  • ***
  • Posts: 140
  • VC:MP Developer. & SA:MP Currently Developer
    • View Profile
Re: How to see if a player is passenger ?
« Reply #8 on: March 21, 2012, 09:10:22 pm »
ejejejeje i think its bugged :(
_______________________________________________
¬ VC:MP Squirrel Developer.
¬ VC:MP pawno Developer.
¬ SA:MP Developer.
¬
¬ Actually developing " San Fierro Roleplay - Latino ", with
my beta team testers, Mapper + Scripter ( me ), 18,000
lines, and is 34% finished. hope to finish it in 4 Or 3 Months.

- MYSQL FULL BASED.
- PCU.
_______________________________________________

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How to see if a player is passenger ?
« Reply #9 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

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline aXXo

  • Wiseguy
  • **
  • Posts: 50
    • View Profile
Re: How to see if a player is passenger ?
« Reply #10 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.

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How to see if a player is passenger ?
« Reply #11 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
« Last Edit: March 23, 2012, 05:59:45 pm by sseebbyy »

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: How to see if a player is passenger ?
« Reply #12 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!
« Last Edit: March 24, 2012, 01:08:32 am by [AoD]NC »