About the gate, simply create one and learn how to move an object, there are planty of tutorials.
Try these /hood and /trunk commands;
pawn Код:
new engine,lights,alarm,doors,bonnet,boot,objective;
public OnPlayerCommandText(playerid, cmdtext[]) {
if(strcmp("/hood", cmdtext, true, 10) == 0) {
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(vid != INVALID_VEHICLE_ID) {
if(bonnet == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_OFF, boot, objective);
else if(bonnet == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_ON, boot, objective);
}
return 1;
}
if(strcmp("/trunk", cmdtext, true, 10) == 0) {
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(vid != INVALID_VEHICLE_ID) {
if(boot == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
else if(boot == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
}
return 1;
}
return 0;
}