/fix (with checking hp and tyres)

Started by !, Dec 15, 2016, 06:52 AM

Previous topic - Next topic

!

Created this topic only for newbie as there is not any topic similar to this i mean
/fix with checking vehicle tyres. :) ;D

I have checked this only on infernus(4 tyres)

//Add this in function onPlayerCommand( player, cmd, text )
if ( cmd == "fix" )
{
if ( !player.Vehicle ) MessagePlayer( "You must be in the vehicle you want to fix.", player );
else if ( ( player.Vehicle.Health == 1000 )  && ( player.Vehicle.GetTyre(0) == 0 || player.Vehicle.GetTyre(1) == 0 || player.Vehicle.GetTyre(2) == 0 || player.Vehicle.GetTyre(3) == 0 ) ) MessagePlayer( "Your vehicle health is at maximum.", player );
else
{
player.Vehicle.Fix();
MessagePlayer( "Vehicle fixed.", player );
}
}

Discord: zeus#5155

MatheuS

You're forgetting some " in MessagePlayer.
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

!

#2
Quote from: MatheuS on Dec 15, 2016, 08:31 AMYou're forgetting some " in MessagePlayer.
Oh thx for informing mistakenly removed during removing colour constants -_-

Discord: zeus#5155