pawn Код:
CMD:lights(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_SKYBLUE, "Error: You are not in a vehicle.");
if(GetPlayerVehicleSeat(playerid) != 0)
return SendClientMessage(playerid, COLOR_SKYBLUE, "Error: You are not in the drivers seat.");
if(lights == 1)
{
SetVehicleParamsEx(vehicleid,engine,0,alarm,doors,bonnet,boot,objective);
}
else
{
SetVehicleParamsEx(vehicleid,engine,1,alarm,doors,bonnet,boot,objective);
}
return 1;
}