27.12.2017, 11:13
PHP код:
if((newkeys == KEY_YES) && (IsPlayerInAnyVehicle(playerid)))
{
//Ligar/desligar vйiculo
new carroa = GetPlayerVehicleID(playerid);
new mot, lu, alar, por, cap, porma, ob;
GetVehicleParamsEx( carroa, mot, lu, alar, por, cap, porma, ob );
if(mot == VEHICLE_PARAMS_OFF)
{
SendClientMessage(playerid, Azul, "Veiculo Ligado");
SetVehicleParamsEx( carroa, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob );
}else{
SendClientMessage(playerid, Vermelho, "Veiculo Desligado");
SetVehicleParamsEx(carroa, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
}
}