Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <a_vehicles>
- /*////////////////////////////////////////////////////////////////////////////////
- _ ____ _____ __ __
- (_) _ \ ___ |_ _|__ __ _| \/ |
- | | |_) / __| | |/ _ \/ _` | |\/| |
- | | __/\__ \ | | __/ (_| | | | |
- |_|_| |___/ |_|\___|\__,_|_| |_|
- Intelligent Programming Style ®
- ____________________________
- www.ips-team.blogspot.com
- www.ips-team.forumeiros.com
- ____________________________
- Criado por pGibson( Luís Gustavo Miki )
- */
- #define ITEM_ENGINE 0
- #define ITEM_LIGHTS 1
- #define ITEM_ALARM 2
- #define ITEM_DOORS 3
- #define ITEM_BONNET 4
- #define ITEM_BOOT 5
- #define ITEM_OBJECTIVE 6
- /*public OnGameModeInit()
- {
- vehicleControlInit();
- return 1;
- }*/
- stock vehicleControlInit()
- {
- ManualVehicleEngineAndLights();
- printf("\n\n[vehicleControl by [iPs]Gibson has just loaded]\n\n");
- return 1;
- }
- stock getVehicleStats( vehicleid , item )
- {
- new _engine, // Motor
- _lights, // Luzes
- _alarm, // Alarme
- _doors, // Portas
- _bonnet, // Capô
- _boot, // Porta malas
- _objective; // Objetivo ( Seta Indicando Objetivo )
- GetVehicleParamsEx(vehicleid, _engine, _lights, _alarm, _doors, _bonnet, _boot, _objective);
- if( item == ITEM_ENGINE ) return _engine;
- if( item == ITEM_LIGHTS ) return _lights;
- if( item == ITEM_ALARM ) return _alarm;
- if( item == ITEM_DOORS ) return _doors;
- if( item == ITEM_BONNET ) return _bonnet;
- if( item == ITEM_BOOT ) return _boot;
- if( item == ITEM_OBJECTIVE ) return _objective;
- }
- stock setVehicleStats( vehicleid , item , bool:stat = true )
- {
- new _engine, // Motor
- _lights, // Luzes
- _alarm, // Alarme
- _doors, // Portas
- _bonnet, // Capô
- _boot, // Porta malas
- _objective; // Objetivo ( Seta Indicando Objetivo )
- GetVehicleParamsEx(vehicleid, _engine, _lights, _alarm, _doors, _bonnet, _boot, _objective);
- if( stat )
- {
- if( item == ITEM_ENGINE ) _engine = true;
- if( item == ITEM_LIGHTS ) _lights = true;
- if( item == ITEM_ALARM ) _alarm = true;
- if( item == ITEM_DOORS ) _doors = true;
- if( item == ITEM_BONNET ) _bonnet = true;
- if( item == ITEM_BOOT ) _boot = true;
- if( item == ITEM_OBJECTIVE ) _objective = true;
- SetVehicleParamsEx(vehicleid, _engine, _lights, _alarm, _doors, _bonnet, _boot, _objective);
- return 1;
- }
- else
- {
- if( item == ITEM_ENGINE ) _engine = false;
- if( item == ITEM_LIGHTS ) _lights = false;
- if( item == ITEM_ALARM ) _alarm = false;
- if( item == ITEM_DOORS ) _doors = false;
- if( item == ITEM_BONNET ) _bonnet = false;
- if( item == ITEM_BOOT ) _boot = false;
- if( item == ITEM_OBJECTIVE ) _objective = false;
- SetVehicleParamsEx(vehicleid, _engine, _lights, _alarm, _doors, _bonnet, _boot, _objective);
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement