Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: FinchDon on Sep 13, 2015, 07:13 AM

Title: Player.Seat
Post by: FinchDon on Sep 13, 2015, 07:13 AM
What This function used for? player.Seat I got Example from old Wiki

function onPlayerCommand( player, cmd, text ) { if ( cmd == "passenger" ) { if ( player.Seat != 255 ) MessagePlayer( "You are curently on seat number " + player.Seat, player ); else MessagePlayer( "You are not in a vehicle.", player ); } }


Title: Re: Player.Seat
Post by: jayant on Sep 13, 2015, 07:56 AM
You saw a healing ambulance in vccnr ? If yes,It can be used for that purpose and other things according to you.
Title: Re: Player.Seat
Post by: KAKAN on Sep 13, 2015, 08:46 AM
Quote from: jayant on Sep 13, 2015, 07:56 AMYou saw a healing ambulance in vccnr ? If yes,It can be used for that purpose and other things according to you.

How to make a healing ambulance?
Title: Re: Player.Seat
Post by: FinchDon on Sep 13, 2015, 09:03 AM
What do you mean ??? I Didnt understand
Title: Re: Player.Seat
Post by: Xmair on Sep 13, 2015, 09:44 AM
@KAKAN .
It's easy.
Whenever a player enters a vehicle.
Check the vehicle, if it is an ambulance, Heal the player.
I will post an example when I get on my pc.
Title: Re: Player.Seat
Post by: MacTavish on Sep 13, 2015, 09:46 AM
Just an example but not tested because i posted from mobile

onPlayerEnterVehicle( player, vehicle, door )
{
if (player.Vehicle.Model == AMBULANCEmodelid  && player.Seat == 0)
{
player.Health = 100;
MessagePlayer("Healed",player);
}
}
Title: Re: Player.Seat
Post by: KAKAN on Sep 13, 2015, 10:00 AM
:P, this system can be used to evade tho, anyways you gave me the IDEA, thanks!
Title: Re: Player.Seat
Post by: FinchDon on Sep 13, 2015, 10:04 AM
I didn't ask for ambulance system i just wanna know what is player.Seat -_-
Title: Re: Player.Seat
Post by: Thijn on Sep 13, 2015, 10:15 AM
Quote from: FinchDon on Sep 13, 2015, 10:04 AMI didn't ask for ambulance system i just wanna know what is player.Seat -_-
If you actually understand English you would've known by now. It returns the seat a player is sitting in. 0 is driver, 1,2,3 passenger.