public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
new engine,lights,alarm,doors,bonnet,boot,objective;
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
//Veнculo
if(dialogid == 12){
if(response)
if(listitem == 0){
if(engine == VEHICLE_PARAMS_OFF){
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid,0xFFCE5CAA,"[Server]: {ffffff}Vocк ligou o motor do veнculo");
}
else if(engine == VEHICLE_PARAMS_ON){
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid,0xFFCE5CAA,"[Server]: {ffffff}Vocк desligou o motor do veнculo");
}
}
else if(listitem == 1){
if(lights == VEHICLE_PARAMS_OFF){
SetVehicleParamsEx(vehicleid, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid,0xFFCE5CAA,"[Server]: {ffffff}Vocк ligou as luzes do veнculo");
}
else if(lights == VEHICLE_PARAMS_ON){
SetVehicleParamsEx(vehicleid, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid,0xFFCE5CAA,"[Server]: {ffffff}Vocк desligou as luzes do veнculo");
}
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF);
SendClientMessage(playerid,0xFFCE5CAA,"[Server]: {ffffff}Use /ligarv para acessar as opзхes do veнculo");
return 1;
}
CMD:ligarv(playerid){
ShowPlayerDialog(playerid,12,DIALOG_STYLE_LIST,"{ffffff}Veнculo","{ffffff}Motor\n{ffffff}Luzes\n{ffffff}Alarme\n{ffffff}Portas\n{ffffff}Capф\n{ffffff}Porta-Malas","Ok",#);
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid,0xFFCE5CAA,"[Server]: {ffffff}Use /ligarv para acessar as opзхes do veнculo"); return 1; } |