Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object NeonLight, NeonLight1, neons, neons1;
- float neonheight;
- Vehicle myveh;
- uint BM_air_landlites03 = 0xD20167BE;
- int neonheight;
- void PrintText(char *text)
- {
- PRINT_STRING_WITH_LITERAL_STRING_NOW("string", text, 5000, 1);
- }
- void Neon(void)
- {
- if ( IS_CHAR_IN_ANY_CAR(GetPlayerPed()) )
- {
- if ( DOES_OBJECT_EXIST(neons) && DOES_OBJECT_EXIST(neons1) )
- {
- DELETE_OBJECT(&neons);
- DELETE_OBJECT(&neons1);
- PrintText("Neon Lights Off");
- }
- else
- {
- GET_CAR_CHAR_IS_USING(GetPlayerPed(), &myveh);
- Ped Pped = GetPlayerPed();
- if ( !IS_CHAR_ON_ANY_BIKE(Pped) && (!IS_CHAR_IN_ANY_BOAT(Pped)) && (!IS_CHAR_IN_ANY_HELI(Pped)) && (!IS_BIG_VEHICLE(myveh)) )
- {
- REQUEST_MODEL(BM_air_landlites03);
- while ( !HAS_MODEL_LOADED(BM_air_landlites03) ) WAIT(10);
- if ( HAS_MODEL_LOADED(BM_air_landlites03) )
- {
- CREATE_OBJECT(BM_air_landlites03 ,0,0,0,&NeonLight,1);
- WAIT(10);
- CREATE_OBJECT(BM_air_landlites03 ,0,0,0,&NeonLight1,1);
- WAIT(10);
- MARK_MODEL_AS_NO_LONGER_NEEDED(BM_air_landlites03);
- neonheight = -0.18;
- if ( IS_CAR_MODEL(myveh, MODEL_SULTAN) ) neonheight = -0.10;
- else if ( IS_CAR_MODEL(myveh, MODEL_PEYOTE) ) neonheight = -0.07;
- //ATTACH_OBJECT_TO_CAR(Object obj, Vehicle v, uint unknown0_0, float pX, float pY, float pZ, float rX, float rY, float rZ);
- ATTACH_OBJECT_TO_CAR(NeonLight, myveh, 0, 0, -0.35, neonheight, 1.58, 0, 0);// rear neon
- ATTACH_OBJECT_TO_CAR(NeonLight1, myveh, 0, 0, 0.35, neonheight, -1.58, 0, 0);// front neon
- FREEZE_OBJECT_POSITION(NeonLight, true);
- FREEZE_OBJECT_POSITION(NeonLight1, true);
- SET_OBJECT_VISIBLE(NeonLight, true);
- SET_OBJECT_VISIBLE(NeonLight1, true);
- neons = NeonLight;
- neons1 = NeonLight1;
- MARK_OBJECT_AS_NO_LONGER_NEEDED(&NeonLight);
- MARK_OBJECT_AS_NO_LONGER_NEEDED(&NeonLight1);
- PrintText("Neon Lights On");
- }
- else PrintText("Unable to load object");
- }
- else PrintText("Neons only work with Cars");
- }
- }
- else PrintText("Not in a Car");
- }
Advertisement
Add Comment
Please, Sign In to add comment