Fix Cmd Problem :/

Started by ali_vcmp, Dec 03, 2014, 08:19 PM

Previous topic - Next topic

ali_vcmp

I Make This Fix Cmd But it Only Increase Vehicle Health Its Doesnt Repair Vehicle Body Idk Why But Pls Need Help
  else if ( cmd == "fix" )
  {
    local veh = player.Vehicle;
if ( !veh ) MessagePlayer( RED+"[Dod-Error] You must be in a Vehicle.", player );
else if ( veh.Health == 1000 ) MessagePlayer( RED+"[Dod-Error] There is no need to fix your vehicle.", player );
else
{
         NewTimer( "Fix", 3000, 1, player.ID );
               MessagePlayer( ORANGE+">> Fixing your Vehicle in 3 secs..", player );
}
  }
Cmd

function Fix(player)
{
local p = FindPlayer( player );
p.Vehicle.Health = 1000;
ePrivMessage( "Successfully fixed your vehicle.", p );
}

Banaqs

function Fix(player)
{
local p = FindPlayer( player );
if (p)
{
    p.Vehicle.Fix();
    ePrivMessage( "Successfully fixed your vehicle.", p );
}
}

ali_vcmp

Thanks You Banaqs Topic Locked