Liberty Unleashed

Scripting => Script Help => Topic started by: mimomohamed on October 20, 2011, 01:42:17 pm

Title: help
Post by: mimomohamed on October 20, 2011, 01:42:17 pm
HOW CAN I MAKE THIS
function onClientEnteredVehicle( veh, seat )
{
   if ( plr.Vehicle.Model = 126 )
}

how can i make { if the player enter the plane ? }

i need to make the things under IF for the plane only not for any vehicle
Title: Re: help
Post by: mimomohamed on October 20, 2011, 07:52:55 pm
LOOK IF I NEED TO MAKE SOMETHING FOR PLAYER VEHICLE I TYPE
{
IF plr.veh
}

SO IF I NEED TO MAKE SOMETHING FOR PLAYER PLANE WHAT I MUST TYPE ????????

THAT IS ALL
Title: Re: help
Post by: Force on October 20, 2011, 08:16:04 pm
Err what? You mean the Dodo?
Title: Re: help
Post by: mimomohamed on October 20, 2011, 08:55:59 pm
ya the DODO
Title: Re: help
Post by: Force on October 20, 2011, 09:49:43 pm
Then just check that player.Vehicle.Model == VEH_DODO - not hard.
Title: Re: help
Post by: mimomohamed on October 21, 2011, 10:28:05 am
thanks man but will it be like that

function onClientEnteredVehicle( veh, seat )
{
   if ( player.Vehicle.Model == VEH_DODO )
   {

if it will be like that it didn't work with me !
sorry  :-X
Title: Re: help
Post by: Thijn on October 21, 2011, 01:35:31 pm
Try changing it to:
Code: [Select]
function onClientEnteredVehicle( veh, seat )
{
if ( veh.Model == VEH_DODO )
{
Message("You entered a plane!");
}
}
Title: Re: help
Post by: mimomohamed on October 21, 2011, 02:21:39 pm
sorry didn't work too
and nothing appear in the console
Title: Re: help
Post by: Force on October 21, 2011, 06:21:06 pm
Erm, you are running this script as a client script, right?
Title: Re: help
Post by: mimomohamed on October 22, 2011, 11:16:07 am
<script file="p.nut" client="1"/>
Title: Re: help
Post by: Thijn on October 22, 2011, 03:57:12 pm
Are you loading the right script folder in content.xml?
Title: Re: help
Post by: mimomohamed on October 23, 2011, 06:43:59 am
sure yes
Title: Re: help
Post by: Thijn on October 23, 2011, 07:23:09 pm
Sorry, But you fail then. The script is fine...
Title: Re: help
Post by: mimomohamed on October 24, 2011, 03:53:31 pm
thanks man i made it by using it in the speedo script  :D :D :D