Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (strcmp("/motor", cmdtext, true, 10) == 0)
- {
- new vehicle = GetPlayerVehicleID(playerid);
- if(Gas[vehicle] <= 0)
- {
- NoFuel[playerid] = 1;
- PlayerPlaySound(playerid, 1159, 0.0, 0.0, 0.0);
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(vehicle, mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
- motor[playerid] = 0;
- return 1;
- }
- new mot, lu, alar, por, cap, porma, ob;
- new carro = GetPlayerVehicleID(playerid);
- new playerState = GetPlayerState(playerid);
- if(somligado[carro] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "Você não pode ligar o motor com o sistema de som ligado neste veículo(/ligarsom para desligar)!");
- return 1;
- }
- if(carro != INVALID_VEHICLE_ID && playerState == PLAYER_STATE_DRIVER)
- {
- if(motor[playerid] == 0)
- {
- GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
- motor[playerid] = 1;
- SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
- }
- else{
- GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
- motor[playerid] = 0;
- SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!");
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment