Guest User

C-RainbowCar

a guest
Aug 29th, 2012
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. //==============================================================================
  2. //-----------------------------> C-RainbowCar <---------------------------------
  3. //-----------------------------------> By <-------------------------------------
  4. //------------------------------> C00K13M0N$73R <-------------------------------
  5. //==============================================================================
  6. #include <a_samp>
  7. #include <zcmd>
  8.  
  9. new Timer1;
  10. new Timer2;
  11. new Timer3;
  12. new Timer4;
  13. new Timer5;
  14. new Timer6;
  15.  
  16. new IsRainbow[MAX_PLAYERS];
  17.  
  18. forward Color1(playerid);
  19. forward Color2(playerid);
  20. forward Color3(playerid);
  21. forward Color4(playerid);
  22. forward Color5(playerid);
  23. forward Color6(playerid);
  24. forward Color7(playerid);
  25.  
  26. CMD:rainbow(playerid,params[])
  27. {
  28. if(!IsPlayerInAnyVehicle(playerid)) return 0;
  29. KillTimer(Timer2);
  30. KillTimer(Timer3);
  31. KillTimer(Timer4);
  32. KillTimer(Timer5);
  33. KillTimer(Timer6);
  34. Timer1 = SetTimerEx("Color1",500,0,"d",playerid);
  35. SendClientMessage(playerid,-1,"Rainbow car started! Use /stop to stop!");
  36. IsRainbow[playerid] = 1;
  37. return 1;
  38. }
  39.  
  40. CMD:v(playerid,params[])
  41. {
  42. CreateVehicle(411,0.0,0.0,3.0,0.0,0,0,500);
  43. return 1;
  44. }
  45. CMD:stop(playerid,params[])
  46. {
  47. KillTimer(Timer1);
  48. KillTimer(Timer2);
  49. KillTimer(Timer3);
  50. KillTimer(Timer4);
  51. KillTimer(Timer5);
  52. KillTimer(Timer6);
  53. SendClientMessage(playerid,-1,"You stopped the rainbow car!");
  54. return 1;
  55. }
  56.  
  57. public Color1(playerid)
  58. {
  59. new vehicleid = GetPlayerVehicleID(playerid);
  60. KillTimer(Timer1);
  61. ChangeVehicleColor(vehicleid,0,0);
  62. Timer2 = SetTimerEx("Color2",500,0,"d",playerid);
  63. }
  64.  
  65. public Color2(playerid)
  66. {
  67. new vehicleid = GetPlayerVehicleID(playerid);
  68. KillTimer(Timer2);
  69. ChangeVehicleColor(vehicleid,1,1);
  70. Timer3 = SetTimerEx("Color3",500,0,"d",playerid);
  71. }
  72.  
  73. public Color3(playerid)
  74. {
  75. new vehicleid = GetPlayerVehicleID(playerid);
  76. KillTimer(Timer3);
  77. ChangeVehicleColor(vehicleid,2,2);
  78. Timer4 = SetTimerEx("Color4",500,0,"d",playerid);
  79. }
  80.  
  81. public Color4(playerid)
  82. {
  83. new vehicleid = GetPlayerVehicleID(playerid);
  84. KillTimer(Timer4);
  85. ChangeVehicleColor(vehicleid,3,3);
  86. Timer5 = SetTimerEx("Color5",500,0,"d",playerid);
  87. }
  88.  
  89. public Color5(playerid)
  90. {
  91. new vehicleid = GetPlayerVehicleID(playerid);
  92. KillTimer(Timer5);
  93. ChangeVehicleColor(vehicleid,4,4);
  94. Timer6 = SetTimerEx("Color6",500,0,"d",playerid);
  95. }
  96.  
  97. public Color6(playerid)
  98. {
  99. new vehicleid = GetPlayerVehicleID(playerid);
  100. KillTimer(Timer6);
  101. ChangeVehicleColor(vehicleid,5,5);
  102. SetTimerEx("Color1",500,0,"d",playerid);
  103. }
Advertisement
Add Comment
Please, Sign In to add comment