Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Sistema de Motor By Willian_Luigi
- a pedido LuizGustavo
- Modo de USO: \
- Ctrl esquerdo Liga motor, CAPSLOCK liga faróis
- */
- #include <a_samp>
- public OnFilterScriptInit()
- {
- print("\n===============================");
- print("*******************************");
- print("\nFilterScript By Willian_Luigi\n");
- print("*******************************");
- print("===============================\n");
- return 0;
- }
- new motor[MAX_PLAYERS], farol[MAX_PLAYERS];
- public OnGameModeInit()
- {
- ManualVehicleEngineAndLights();
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(IsPlayerInAnyVehicle(playerid) && newkeys == 1)
- {
- if(motor[playerid] == 0)
- {
- new car = GetPlayerVehicleID(playerid), wi, ll, ia, n, dlc, dmais, he;
- GetVehicleParamsEx(car, wi, ll, ia, n, dlc, dmais, he);
- SetVehicleParamsEx(car, VEHICLE_PARAMS_ON, ll, ia, n, dlc, dmais, he);
- motor[playerid] = 1;
- SendClientMessage(playerid, -1, "Motor willianV8 ligado.");
- return 1;
- }
- else if(motor[playerid] == 1)
- {
- new car = GetPlayerVehicleID(playerid), wi, ll, ia, n, dlc, dmais, he;
- GetVehicleParamsEx(car, wi, ll, ia, n, dlc, dmais, he);
- SetVehicleParamsEx(car, VEHICLE_PARAMS_OFF, ll, ia, n, dlc, dmais, he);
- motor[playerid] = 0;
- SendClientMessage(playerid,-1, "Motor willianV8 desligado.");
- return 1;
- }
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid) && newkeys == 2)
- {
- if(farol[playerid] == 0)
- {
- new car = GetPlayerVehicleID(playerid), wi, ll, ia, n, dlc, dmais, he;
- GetVehicleParamsEx(car, wi, ll, ia, n, dlc, dmais, he);
- SetVehicleParamsEx(car, wi, VEHICLE_PARAMS_ON, ia, n, dlc, dmais, he);
- farol[playerid] = 1;
- SendClientMessage(playerid, -1, "Farol willianShenon ligado.");
- return 1;
- }
- else if(farol[playerid] == 1)
- {
- new car = GetPlayerVehicleID(playerid), wi, ll, ia, n, dlc, dmais, he;
- GetVehicleParamsEx(car, wi, ll, ia, n, dlc, dmais, he);
- SetVehicleParamsEx(car, wi, VEHICLE_PARAMS_OFF, ia, n, dlc, dmais, he);
- farol[playerid] = 0;
- SendClientMessage(playerid, -1, "Farol willianShenon desligado.");
- return 1;
- }
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment