Liberty Unleashed
Scripting => Script Help => Topic started by: Beary on January 18, 2015, 12:51:13 am
-
Everybody is good, I have a question to ask. :)
When I get onPlayerEnteredVehicle
I want to get:
If (pVehicle.Model = VEH_POLICE)
MessagePlayer ("You entered Police Car.", player);
But he is wrong, I'm not sure if (pVehicle.Model = VEH_POLICE) wrote is correct
How do I write the script? Please help me!
-
You are missing a second equals sign next to the one you have.
It should be written as:
If (pVehicle.Model == VEH_POLICE)
-
You are missing a second equals sign next to the one you have.
It should be written as:
If (pVehicle.Model == VEH_POLICE)
I changed But I don't work here I'm not too will use BBS system
-------------------------------------------------------------------------------
function onPlayerEnteredVehicle( player, vehicle, seat )
{
if (pVehicle.Model == VEH_POLICE)
{
MessagePlayer( "Enter police car.", player );
}
return 1;
}-------------------------------------------------------------------------------
Maybe I am wrong?
-
The problem with it now, is there isn't anything defined as "pVehicle".
Since you used "vehicle" (without the p) in your function, then just use that.
if( vehicle.Model == VEH_POLICE )
-
The problem with it now, is there isn't anything defined as "pVehicle".
Since you used "vehicle" (without the p) in your function, then just use that.
if( vehicle.Model == VEH_POLICE )
Thank :)