How..
#3

pawn Код:
if( !strcmp( cmdtext, "/hood", true ) )
{
   if( !IsPlayerInAnyVehicle( playerid ) )
      return SendClientMessage( playerid, 0xFFFFFF, "Error: You are not in a vehicle." );
   new v[ 7 ];
   GetVehicleParamsEx( GetPlayerVehicleID( playerid ), v[ 0 ], v[ 1 ], v[ 2 ], v[ 3 ], v[ 4 ], v[ 5 ], v[ 6 ] );
   if( v[ 4 ] == VEHICLE_PARAMS_OFF ) v[ 4 ] = VEHICLE_PARAMS_ON;
   else if( v[ 4 ] == VEHICLE_PARAMS_ON ) v[ 5 ] = VEHICLE_PARAMS_OFF;
   SetVehicleParamsEx( GetPlayerVehicleID( playerid ), v[ 0 ], v[ 1 ], v[ 2 ], v[ 3 ], v[ 4 ], v[ 5 ], v[ 6 ] );
   return 1;
}
If the hood is not open, it will open it. If it is already open, it will close it.

Do the exact same thing for the trunk, except change the variable v[ 5 ].
Reply


Messages In This Thread
How.. - by ZmaXy - 28.11.2010, 14:39
Re: How.. - by WillyP - 28.11.2010, 14:39
Re: How.. - by Grim_ - 28.11.2010, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)