Player.Seat

Started by FinchDon, Sep 13, 2015, 07:13 AM

Previous topic - Next topic

FinchDon

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 ); } }


For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

jayant

You saw a healing ambulance in vccnr ? If yes,It can be used for that purpose and other things according to you.

KAKAN

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?
oh no

FinchDon

What do you mean ??? I Didnt understand
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Xmair

@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.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

MacTavish

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);
}
}

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

KAKAN

:P, this system can be used to evade tho, anyways you gave me the IDEA, thanks!
oh no

FinchDon

I didn't ask for ambulance system i just wanna know what is player.Seat -_-
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Thijn

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.