08.08.2012, 19:37
EDIT:
How can i use this at the same time?
How can i use this at the same time?
pawn Код:
CMD:hood(playerid, params[])
{
new vehicleid,engine,lights,alarm,doors,bonnet,boot,objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You are not in a vehicle.");
if(GetPlayerVehicleSeat(playerid) != 0)
return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You are not in the drivers seat.");
if(bonnet == 1)
{
SetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,0,boot,objective);
}
else
{
SetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,1,boot,objective);
}
return 1;
}
CMD:trunk(playerid, params[])
{
new vehicleid,engine,lights,alarm,doors,bonnet,boot,objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You are not in a vehicle.");
if(GetPlayerVehicleSeat(playerid) != 0)
return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You are not in the drivers seat.");
if(boot == 1)
{
SetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,0,objective);
}
else
{
SetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,1,objective);
}
return 1;
}