Advertisement
Guest User

NEONS

a guest
Jul 19th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 24.34 KB | None | 0 0
  1. //---------Simple Neon system by Mr.Steel - Do not remove credits.---------
  2. #include <a_samp>
  3. #include <zcmd>
  4. #include <core>
  5. #include <float>
  6. //------------------------------------------------------------------------------
  7. #define DIALOG_NEONTYPES 150
  8. #define DIALOG_SOLID 151
  9. #define DIALOG_SIMULTANEOUS 152
  10. #define DIALOG_ALTERNATING 153
  11. //------------------------------------------------------------------------------
  12. new SolidNeon[MAX_VEHICLES],BlinkTimerT[MAX_VEHICLES],AltFlash[MAX_VEHICLES];
  13. new Blue1[MAX_VEHICLES],Blue2[MAX_VEHICLES],Green1[MAX_VEHICLES],Green2[MAX_VEHICLES],Pink1[MAX_VEHICLES],Pink2[MAX_VEHICLES],Red1[MAX_VEHICLES],Red2[MAX_VEHICLES],White1[MAX_VEHICLES],White2[MAX_VEHICLES],Yellow1[MAX_VEHICLES],Yellow2[MAX_VEHICLES];
  14. new BlinkTimer[MAX_VEHICLES];
  15. new AltSide1[MAX_VEHICLES];
  16. //------------------------------------------------------------------------------
  17. stock IsNeonActive(vehicleid)
  18. {
  19.         if(BlinkTimer[vehicleid] == 1) return 1;
  20.         if(SolidNeon[vehicleid] == 1) return 1;
  21.         if(AltFlash[vehicleid] == 1) return 1;
  22.         else return 0;
  23. }
  24. stock IsVehicleValid(v)
  25. {
  26.         if(v==403||v==406||v==407||v==408||v==416||v==417||v==424||v==425||v==430||v==432||v==433||v==435||v==437||v==441||v==443||v==444||v==446||v==447||v==448||v==449||v==450||v==452||v==453||v==454||v==455||v==456||v==457||v==460||v==461||v==462) return 0;
  27.         if(v==463||v==464||v==465||v==468||v==469||v==470||v==471||v==472||v==473||v==476||v==481||v==484||v==485||v==486||v==487||v==488||v==493||v==497||v==500||v==501||v==509||v==510||v==511||v==512||v==513||v==514||v==515||v==519||v==520||v==521) return 0;
  28.         if(v==522||v==523||v==524||v==530||v==532||v==537||v==538||v==539||v==544||v==548||v==553||v==556||v==557||v==563||v==564||v==568||v==569||v==570||v==571||v==572||v==573||v==574||v==577||v==578||v==581||v==582||v==584||v==583||v==586||v==590) return 0;
  29.         if(v==591||v==592||v==593||v==594||v==595||v==601||v==606||v==607||v==608||v==610||v==11) return 0;
  30.         else return 1;
  31. }
  32. //------------------------------------------------------------------------------
  33. public OnVehicleDeath(vehicleid, killerid)
  34. {
  35.         StopBlinkNeons(vehicleid);
  36.         return 1;
  37. }
  38. public OnVehicleSpawn(vehicleid)
  39. {
  40.         StopBlinkNeons(vehicleid);
  41.         return 1;
  42. }
  43. //------------------------------------------------------------------------------
  44. CMD:getneon(playerid,params[])
  45. {
  46.         if(!IsVehicleValid(GetVehicleModel(GetPlayerVehicleID(playerid)))) return SendClientMessage(playerid, -1, "{F81414}ERROR: {FFFF00}You can't use neon on this vehicle, if you feel like you can, feel free to talk with MrSteel,{00EEFF}Mr.Steel#9232. ");
  47.         if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "{F81414}ERROR: {00EEFF}You must be driving this vehicle to use neons.");
  48.         ShowPlayerDialog(playerid, DIALOG_NEONTYPES, DIALOG_STYLE_LIST, "Neon Settings", "Solid Neon/No Flash\nSimultaneous Flash\nAlternating Flash\nRemove All Neon", "Select", "Cancel");
  49.         return 1;
  50. }
  51. //----------------------------------------------------------
  52. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  53. {
  54.         if(dialogid == DIALOG_NEONTYPES)
  55.         {
  56.             if(response == 1)
  57.             {
  58.                 switch(listitem)
  59.                 {
  60.                     case 0: ShowPlayerDialog(playerid, DIALOG_SOLID, DIALOG_STYLE_LIST, "Solid Vehicle Neon", "Blue\nGreen\nPink\nRed\nWhite\nYellow", "Select", "Cancel");
  61.                                 case 1: ShowPlayerDialog(playerid, DIALOG_SIMULTANEOUS, DIALOG_STYLE_LIST, "Simultaneous Flash Pattern", "Yellow\nBlue\nGreen\nPink\nRed\nWhite\nAll Colours(Cycling)", "Select", "Back");
  62.                                 case 2: ShowPlayerDialog(playerid, DIALOG_ALTERNATING, DIALOG_STYLE_LIST, "Alternating Flash Pattern", "Yellow\nBlue\nGreen\nPink\nRed\nWhite", "Select", "Back");
  63.                                 case 3: StopBlinkNeons(GetPlayerVehicleID(playerid));
  64.                         }
  65.                 }
  66.         }
  67.     if(dialogid == DIALOG_SOLID)
  68.     {
  69.         if(response == 1)
  70.         {
  71.             if(IsNeonActive(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, -1, "{F81414}ERROR: {FFFFFF}Please remove all existing neon first.");
  72.                 switch(listitem)
  73.                 {
  74.                     case 0: SetBlueNeons(GetPlayerVehicleID(playerid));
  75.                                 case 1: SetGreenNeons(GetPlayerVehicleID(playerid));
  76.                                 case 2: SetPinkNeons(GetPlayerVehicleID(playerid));
  77.                                 case 3: SetRedNeons(GetPlayerVehicleID(playerid));
  78.                                 case 4: SetWhiteNeons(GetPlayerVehicleID(playerid));
  79.                                 case 5: SetYellowNeons(GetPlayerVehicleID(playerid));
  80.                         }
  81.                 }
  82.                 else ShowPlayerDialog(playerid, DIALOG_NEONTYPES, DIALOG_STYLE_LIST, "Neon Settings", "Solid Neon/No Flash\nSimultaneous Flash\nAlternating Flash\nRemove All Neon", "Select", "Cancel");
  83.         }
  84.         if(dialogid == DIALOG_SIMULTANEOUS)
  85.         {
  86.                 if(response == 1)
  87.                 {
  88.                     if(IsNeonActive(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, -1, "{F81414}ERROR: {FFFFFF}Please remove all existing neon first.");
  89.                     switch(listitem)
  90.                     {
  91.                                 case 0: SetBlinkYellowNeons(GetPlayerVehicleID(playerid));
  92.                                 case 1: SetBlinkBlueNeons(GetPlayerVehicleID(playerid));
  93.                                 case 2: SetBlinkGreenNeons(GetPlayerVehicleID(playerid));
  94.                                 case 3: SetBlinkPinkNeons(GetPlayerVehicleID(playerid));
  95.                                 case 4: SetBlinkRedNeons(GetPlayerVehicleID(playerid));
  96.                                 case 5: SetBlinkWhiteNeons(GetPlayerVehicleID(playerid));
  97.                                 case 6: SetBlinkALLNeons(GetPlayerVehicleID(playerid));
  98.                         }
  99.                 }
  100.                 else ShowPlayerDialog(playerid, DIALOG_NEONTYPES, DIALOG_STYLE_LIST, "Neon Settings", "Solid Neon/No Flash\nSimultaneous Flash\nAlternating Flash\nRemove All Neon", "Select", "Cancel");
  101.         }
  102.         if(dialogid == DIALOG_ALTERNATING)
  103.         {
  104.                 if(response == 1)
  105.                 {
  106.                     if(IsNeonActive(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, -1, "{F81414}ERROR: {FFFFFF}Please remove all existing neon first.");
  107.                     switch(listitem)
  108.                     {
  109.                                 case 0: SetAltYellow(GetPlayerVehicleID(playerid));
  110.                                 case 1: SetAltBlue(GetPlayerVehicleID(playerid));
  111.                                 case 2: SetAltGreen(GetPlayerVehicleID(playerid));
  112.                                 case 3: SetAltPink(GetPlayerVehicleID(playerid));
  113.                                 case 4: SetAltRed(GetPlayerVehicleID(playerid));
  114.                                 case 5: SetAltWhite(GetPlayerVehicleID(playerid));
  115.                         }
  116.                 }
  117.                 else ShowPlayerDialog(playerid, DIALOG_NEONTYPES, DIALOG_STYLE_LIST, "Neon Settings", "Solid Neon/No Flash\nSimultaneous Flash\nAlternating Flash\nRemove All Neon", "Select", "Cancel");
  118.  
  119.         }
  120.         return 1;
  121. }
  122. //------------------------------------------------------------------------------
  123. new ColorNumber = 18647;
  124. new ALLCOLOR1[MAX_VEHICLES],ALLCOLOR2[MAX_VEHICLES];
  125.  
  126. forward SetBALLNeons(vehicleid);
  127. public SetBALLNeons(vehicleid)
  128. {
  129.         ALLCOLOR1[vehicleid] = CreateObject(ColorNumber, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  130.         ALLCOLOR2[vehicleid] = CreateObject(ColorNumber, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  131.         AttachObjectToVehicle(ALLCOLOR1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  132.         AttachObjectToVehicle(ALLCOLOR2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  133.         SetTimerEx("DeleteNeons",500,0,"i",vehicleid);
  134.         ColorNumber ++;
  135.         if(ColorNumber == 18653)
  136.     {
  137.     ColorNumber --;
  138.     ColorNumber --;
  139.     ColorNumber --;
  140.     ColorNumber --;
  141.     ColorNumber --;
  142.     ColorNumber --;
  143.     }
  144.     return 1;
  145. }
  146. forward SetBlinkALLNeons(vehicleid);
  147. public SetBlinkALLNeons(vehicleid)
  148. {
  149.     if(BlinkTimer[vehicleid] == 0)
  150.     {
  151.         BlinkTimerT[vehicleid] = SetTimerEx("SetBALLNeons",1000,1, "i",vehicleid);
  152.         BlinkTimer[vehicleid] = 1;
  153.         }
  154.         return 1;
  155. }
  156. //----------------------------------------------------------
  157. forward SetBlueNeons(vehicleid);
  158. public SetBlueNeons(vehicleid)
  159. {
  160.         StopBlinkNeons(vehicleid);
  161.         SolidNeon[vehicleid] = 1;
  162.         Blue1[vehicleid] = CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  163.         Blue2[vehicleid] = CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  164.         AttachObjectToVehicle(Blue1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  165.         AttachObjectToVehicle(Blue2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  166.         return 1;
  167. }
  168. forward SetBBlueNeons(vehicleid);
  169. public SetBBlueNeons(vehicleid)
  170. {
  171.         Blue1[vehicleid] = CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  172.         Blue2[vehicleid] = CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  173.         AttachObjectToVehicle(Blue1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  174.         AttachObjectToVehicle(Blue2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  175.         SetTimerEx("DeleteNeons",500,0,"i",vehicleid);
  176.         return 1;
  177. }
  178. forward SetBlinkBlueNeons(vehicleid);
  179. public SetBlinkBlueNeons(vehicleid)
  180. {
  181.         BlinkTimerT[vehicleid] = SetTimerEx("SetBBlueNeons",1000,1, "i",vehicleid);
  182.         BlinkTimer[vehicleid] = 1;
  183.         return 1;
  184. }
  185. //----------------------------------------------------------
  186. forward SetGreenNeons(vehicleid);
  187. public SetGreenNeons(vehicleid)
  188. {
  189.     StopBlinkNeons(vehicleid);
  190.     SolidNeon[vehicleid] = 1;
  191.         Green1[vehicleid] = CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  192.         Green2[vehicleid] = CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  193.         AttachObjectToVehicle(Green1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  194.         AttachObjectToVehicle(Green2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  195.         return 1;
  196. }
  197. forward SetBGreenNeons(vehicleid);
  198. public SetBGreenNeons(vehicleid)
  199. {
  200.         Green1[vehicleid] = CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  201.         Green2[vehicleid] = CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  202.         AttachObjectToVehicle(Green1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  203.         AttachObjectToVehicle(Green2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  204.         SetTimerEx("DeleteNeons",500,0,"i",vehicleid);
  205.         return 1;
  206. }
  207. forward SetBlinkGreenNeons(vehicleid);
  208. public SetBlinkGreenNeons(vehicleid)
  209. {
  210.         BlinkTimerT[vehicleid] = SetTimerEx("SetBGreenNeons",1000,1, "i",vehicleid);
  211.         BlinkTimer[vehicleid] = 1;
  212.         return 1;
  213. }
  214. //----------------------------------------------------------
  215. forward SetPinkNeons(vehicleid);
  216. public SetPinkNeons(vehicleid)
  217. {
  218.     StopBlinkNeons(vehicleid);
  219.     SolidNeon[vehicleid] = 1;
  220.         Pink1[vehicleid] = CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  221.         Pink2[vehicleid] = CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  222.         AttachObjectToVehicle(Pink1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  223.         AttachObjectToVehicle(Pink2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  224.         return 1;
  225. }
  226. forward SetBPinkNeons(vehicleid);
  227. public SetBPinkNeons(vehicleid)
  228. {
  229.         Pink1[vehicleid] = CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  230.         Pink2[vehicleid] = CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  231.         AttachObjectToVehicle(Pink1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  232.         AttachObjectToVehicle(Pink2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  233.         SetTimerEx("DeleteNeons",500,0,"i",vehicleid);
  234.         return 1;
  235. }
  236. forward SetBlinkPinkNeons(vehicleid);
  237. public SetBlinkPinkNeons(vehicleid)
  238. {
  239.         BlinkTimerT[vehicleid] = SetTimerEx("SetBPinkNeons",1000,1, "i",vehicleid);
  240.         BlinkTimer[vehicleid] = 1;
  241.         return 1;
  242. }
  243. //----------------------------------------------------------
  244. forward SetRedNeons(vehicleid);
  245. public SetRedNeons(vehicleid)
  246. {
  247.     StopBlinkNeons(vehicleid);
  248.     SolidNeon[vehicleid] = 1;
  249.         Red1[vehicleid] = CreateObject(18647, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  250.         Red2[vehicleid] = CreateObject(18647, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  251.         AttachObjectToVehicle(Red1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  252.         AttachObjectToVehicle(Red2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  253.         return 1;
  254. }
  255. forward SetBRedNeons(vehicleid);
  256. public SetBRedNeons(vehicleid)
  257. {
  258.         Red1[vehicleid] = CreateObject(18647, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  259.         Red2[vehicleid] = CreateObject(18647, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  260.         AttachObjectToVehicle(Red1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  261.         AttachObjectToVehicle(Red2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  262.         SetTimerEx("DeleteNeons",500,0,"i",vehicleid);
  263.         return 1;
  264. }
  265. forward SetBlinkRedNeons(vehicleid);
  266. public SetBlinkRedNeons(vehicleid)
  267. {
  268.         BlinkTimerT[vehicleid] = SetTimerEx("SetBRedNeons",1000,1, "i",vehicleid);
  269.         BlinkTimer[vehicleid] = 1;
  270.         return 1;
  271. }
  272. //----------------------------------------------------------
  273. forward SetWhiteNeons(vehicleid);
  274. public SetWhiteNeons(vehicleid)
  275. {
  276.     StopBlinkNeons(vehicleid);
  277.     SolidNeon[vehicleid] = 1;
  278.         White1[vehicleid] = CreateObject(18652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  279.         White2[vehicleid] = CreateObject(18652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  280.         AttachObjectToVehicle(White1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  281.         AttachObjectToVehicle(White2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  282.         return 1;
  283. }
  284. forward SetBWhiteNeons(vehicleid);
  285. public SetBWhiteNeons(vehicleid)
  286. {
  287.         White1[vehicleid] = CreateObject(18652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  288.         White2[vehicleid] = CreateObject(18652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  289.         AttachObjectToVehicle(White1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  290.         AttachObjectToVehicle(White2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  291.         SetTimerEx("DeleteNeons",500,0,"i",vehicleid);
  292.         return 1;
  293. }
  294. forward SetBlinkWhiteNeons(vehicleid);
  295. public SetBlinkWhiteNeons(vehicleid)
  296. {
  297.         BlinkTimerT[vehicleid] = SetTimerEx("SetBWhiteNeons",1000,1, "i",vehicleid);
  298.         BlinkTimer[vehicleid] = 1;
  299.         return 1;
  300. }
  301. //----------------------------------------------------------
  302. forward SetYellowNeons(vehicleid);
  303. public SetYellowNeons(vehicleid)
  304. {
  305.     StopBlinkNeons(vehicleid);
  306.     SolidNeon[vehicleid] = 1;
  307.         Yellow1[vehicleid] = CreateObject(18650, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  308.         Yellow2[vehicleid] = CreateObject(18650, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  309.         AttachObjectToVehicle(Yellow1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  310.         AttachObjectToVehicle(Yellow2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  311.         return 1;
  312. }
  313. forward SetBYellowNeons(vehicleid);
  314. public SetBYellowNeons(vehicleid)
  315. {
  316.         Yellow1[vehicleid] = CreateObject(18650, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  317.         Yellow2[vehicleid] = CreateObject(18650, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  318.         AttachObjectToVehicle(Yellow1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  319.         AttachObjectToVehicle(Yellow2[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  320.         SetTimerEx("DeleteNeons",500,0,"i",vehicleid);
  321.         return 1;
  322. }
  323. forward SetBlinkYellowNeons(vehicleid);
  324. public SetBlinkYellowNeons(vehicleid)
  325. {
  326.         BlinkTimerT[vehicleid] = SetTimerEx("SetBYellowNeons",1000,1, "i",vehicleid);
  327.         BlinkTimer[vehicleid] = 1;
  328.         return 1;
  329. }
  330. //----------------------------------------------------------
  331. forward SetAltYellow(vehicleid);
  332. public SetAltYellow(vehicleid)
  333. {
  334.         BlinkTimerT[vehicleid] = SetTimerEx("AltYellow",500,1,"i",vehicleid);
  335.         AltFlash[vehicleid] = 1;
  336.         AltSide1[vehicleid] = 0;
  337.         Yellow1[vehicleid] = CreateObject(18650, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  338.     AttachObjectToVehicle(Yellow1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  339.     return 1;
  340. }
  341. forward AltYellow(vehicleid);
  342. public AltYellow(vehicleid)
  343. {
  344.         if(AltSide1[vehicleid] == 0)
  345.         {
  346.                 DestroyObject(Yellow1[vehicleid]);
  347.                 Yellow1[vehicleid] = CreateObject(18650, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  348.         AttachObjectToVehicle(Yellow1[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  349.         AltSide1[vehicleid] = 1;
  350.     }
  351.     else if(AltSide1[vehicleid] == 1)
  352.         {
  353.                 DestroyObject(Yellow1[vehicleid]);
  354.                 Yellow1[vehicleid] = CreateObject(18650, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  355.         AttachObjectToVehicle(Yellow1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  356.         AltSide1[vehicleid] = 0;
  357.     }
  358.     return 1;
  359. }
  360. //----------------------------------------------------------
  361. forward SetAltBlue(vehicleid);
  362. public SetAltBlue(vehicleid)
  363. {
  364.         BlinkTimerT[vehicleid] = SetTimerEx("AltBlue",500,1,"i",vehicleid);
  365.         AltFlash[vehicleid] = 1;
  366.         AltSide1[vehicleid] = 0;
  367.         Blue1[vehicleid] = CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  368.     AttachObjectToVehicle(Blue1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  369.     return 1;
  370.  }
  371. forward AltBlue(vehicleid);
  372. public AltBlue(vehicleid)
  373. {
  374.         if(AltSide1[vehicleid] == 0)
  375.         {
  376.                 DestroyObject(Blue1[vehicleid]);
  377.                 Blue1[vehicleid] = CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  378.         AttachObjectToVehicle(Blue1[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  379.         AltSide1[vehicleid] = 1;
  380.     }
  381.     else if(AltSide1[vehicleid] == 1)
  382.         {
  383.                 DestroyObject(Blue1[vehicleid]);
  384.                 Blue1[vehicleid] = CreateObject(18648, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  385.         AttachObjectToVehicle(Blue1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  386.         AltSide1[vehicleid] = 0;
  387.     }
  388.     return 1;
  389. }
  390. //----------------------------------------------------------
  391. forward SetAltGreen(vehicleid);
  392. public SetAltGreen(vehicleid)
  393. {
  394.         BlinkTimerT[vehicleid] = SetTimerEx("AltGreen",500,1,"i",vehicleid);
  395.         AltFlash[vehicleid] = 1;
  396.         AltSide1[vehicleid] = 0;
  397.         Green1[vehicleid] = CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  398.     AttachObjectToVehicle(Green1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  399.     return 1;
  400. }
  401. forward AltGreen(vehicleid);
  402. public AltGreen(vehicleid)
  403. {
  404.         if(AltSide1[vehicleid] == 0)
  405.         {
  406.                 DestroyObject(Green1[vehicleid]);
  407.                 Green1[vehicleid] = CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  408.         AttachObjectToVehicle(Green1[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  409.         AltSide1[vehicleid] = 1;
  410.     }
  411.     else if(AltSide1[vehicleid] == 1)
  412.         {
  413.                 DestroyObject(Green1[vehicleid]);
  414.                 Green1[vehicleid] = CreateObject(18649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  415.         AttachObjectToVehicle(Green1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  416.         AltSide1[vehicleid] = 0;
  417.     }
  418.     return 1;
  419. }
  420. //----------------------------------------------------------
  421. forward SetAltPink(vehicleid);
  422. public SetAltPink(vehicleid)
  423. {
  424.         BlinkTimerT[vehicleid] = SetTimerEx("AltPink",500,1,"i",vehicleid);
  425.         AltFlash[vehicleid] = 1;
  426.         AltSide1[vehicleid] = 0;
  427.         Pink1[vehicleid] = CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  428.     AttachObjectToVehicle(Pink1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  429.     return 1;
  430.  }
  431. forward AltPink(vehicleid);
  432. public AltPink(vehicleid)
  433. {
  434.         if(AltSide1[vehicleid] == 0)
  435.         {
  436.                 DestroyObject(Pink1[vehicleid]);
  437.                 Pink1[vehicleid] = CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  438.         AttachObjectToVehicle(Pink1[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  439.         AltSide1[vehicleid] = 1;
  440.     }
  441.     else if(AltSide1[vehicleid] == 1)
  442.         {
  443.                 DestroyObject(Pink1[vehicleid]);
  444.                 Pink1[vehicleid] = CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  445.         AttachObjectToVehicle(Pink1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  446.         AltSide1[vehicleid] = 0;
  447.     }
  448.     return 1;
  449. }
  450. //----------------------------------------------------------
  451. forward SetAltRed(vehicleid);
  452. public SetAltRed(vehicleid)
  453. {
  454.         BlinkTimerT[vehicleid] = SetTimerEx("AltRed",500,1,"i",vehicleid);
  455.         AltFlash[vehicleid] = 1;
  456.         AltSide1[vehicleid] = 0;
  457.         Red1[vehicleid] = CreateObject(18647, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  458.     AttachObjectToVehicle(Red1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  459.     return 1;
  460.  }
  461. forward AltRed(vehicleid);
  462. public AltRed(vehicleid)
  463. {
  464.         if(AltSide1[vehicleid] == 0)
  465.         {
  466.                 DestroyObject(Red1[vehicleid]);
  467.                 Red1[vehicleid] = CreateObject(18647, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  468.         AttachObjectToVehicle(Red1[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  469.         AltSide1[vehicleid] = 1;
  470.     }
  471.     else if(AltSide1[vehicleid] == 1)
  472.         {
  473.                 DestroyObject(Red1[vehicleid]);
  474.                 Red1[vehicleid] = CreateObject(18647, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  475.         AttachObjectToVehicle(Red1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  476.         AltSide1[vehicleid] = 0;
  477.     }
  478.     return 1;
  479. }
  480. //----------------------------------------------------------
  481. forward SetAltWhite(vehicleid);
  482. public SetAltWhite(vehicleid)
  483. {
  484.         BlinkTimerT[vehicleid] = SetTimerEx("AltWhite",500,1,"i",vehicleid);
  485.         AltFlash[vehicleid] = 1;
  486.         AltSide1[vehicleid] = 0;
  487.         White1[vehicleid] = CreateObject(18652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  488.     AttachObjectToVehicle(White1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  489.     return 1;
  490. }
  491. forward AltWhite(vehicleid);
  492. public AltWhite(vehicleid)
  493. {
  494.         if(AltSide1[vehicleid] == 0)
  495.         {
  496.                 DestroyObject(White1[vehicleid]);
  497.                 White1[vehicleid] = CreateObject(18652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  498.         AttachObjectToVehicle(White1[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  499.         AltSide1[vehicleid] = 1;
  500.     }
  501.     else if(AltSide1[vehicleid] == 1)
  502.         {
  503.                 DestroyObject(White1[vehicleid]);
  504.                 White1[vehicleid] = CreateObject(18652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  505.         AttachObjectToVehicle(White1[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0);
  506.         AltSide1[vehicleid] = 0;
  507.     }
  508.     return 1;
  509. }
  510. //----------------------------------------------------------
  511. forward StopBlinkNeons(vehicleid);
  512. public StopBlinkNeons(vehicleid)
  513. {
  514.         KillTimer(BlinkTimerT[vehicleid]);
  515.         DeleteNeons(vehicleid);
  516.         BlinkTimer[vehicleid] = 0;
  517.         AltFlash[vehicleid] = 0;
  518.         return 1;
  519. }
  520. //----------------------------------------------------------
  521. forward Hydraulics(playerid, vehicleid);
  522. public Hydraulics(playerid, vehicleid)
  523. {
  524.     AddVehicleComponent(vehicleid,1087);
  525.         return 1;
  526. }
  527. //----------------------------------------------------------
  528. forward DeleteNeons(vehicleid);
  529. public DeleteNeons(vehicleid)
  530. {
  531.         SolidNeon[vehicleid] = 0;
  532.         DestroyObject(Blue1[vehicleid]);
  533.         DestroyObject(Blue2[vehicleid]);
  534.         DestroyObject(Green1[vehicleid]);
  535.         DestroyObject(Green2[vehicleid]);
  536.         DestroyObject(Pink1[vehicleid]);
  537.         DestroyObject(Pink2[vehicleid]);
  538.         DestroyObject(Red1[vehicleid]);
  539.         DestroyObject(Red2[vehicleid]);
  540.         DestroyObject(Yellow1[vehicleid]);
  541.         DestroyObject(Yellow2[vehicleid]);
  542.         DestroyObject(White1[vehicleid]);
  543.         DestroyObject(White2[vehicleid]);
  544.         DestroyObject(ALLCOLOR1[vehicleid]);
  545.         DestroyObject(ALLCOLOR2[vehicleid]);
  546.         return 1;
  547. }
  548. //------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement