Advertisement
Guest User

GetVehicleColor

a guest
Sep 13th, 2010
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.47 KB | None | 0 0
  1. /*
  2.     @Release Name: GetVehicleColor
  3.     @Release Type: Include
  4.     @Author: RyDeR`
  5.     @Version: 1.0
  6.     @Last Update: 13/09/2010 ~ 16:30
  7.     @Bugs: /
  8.     @Author Notes: You must use addStaticVehicle(Ex) and/or createVehicle and/or destroyVehicle instead of the standart functions!
  9.     @Functions:
  10.  
  11.             // -- [Need Functions] -- //
  12.  
  13.             @Function: addStaticVehicle(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2)
  14.             @Info: Same function as AddStaticVehicle
  15.             @Params:
  16.                 - /(Obvious)
  17.  
  18.             @Function: addStaticVehicleEx(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2, respawn_delay)
  19.             @Info: Same function as AddStaticVehicleEx
  20.             @Params:
  21.                 - /(Obvious)
  22.  
  23.             @Function: createVehicle(vehicletype, Float: x, Float: y, Float: z, Float: rotation, color1, color2, respawn_delay)
  24.             @Info: Same function as CreateVehicle
  25.             @Params:
  26.                 - /(Obvious)
  27.  
  28.             @Function: destroyVehicle(vehicleid)
  29.             @Info: Same function as DestroyVehicle
  30.             @Params:
  31.                 - /(Obvious)
  32.  
  33.             // -- [Main Function] -- //
  34.  
  35.             @Function: GetVehicleColor(vehicleid, &color1, &color2)
  36.             @Info: Will store the vehicle colors in variable color1 and color2 you create.
  37.             @Params:
  38.                 - vehicleid = The ID of the vehicle
  39.                 - &color1 = The variable you create to store color1 in.
  40.                 - &color2 = Same here as above but for color2.
  41. */
  42.  
  43. new
  44.     vehicleColor[MAX_VEHICLES][2]
  45. ;
  46.  
  47. stock addStaticVehicle(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2)
  48. {
  49.     new
  50.         vehicleid = AddStaticVehicle(modelid, x, y, z, angle, color1, color2)
  51.     ;
  52.     return ((vehicleColor[vehicleid][0] = color1), (vehicleColor[vehicleid][1] = color2));
  53. }
  54.  
  55. stock addStaticVehicleEx(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2, respawn_delay)
  56. {
  57.     new
  58.         vehicleid = AddStaticVehicleEx(modelid, x, y, z, angle, color1, color2, respawn_delay)
  59.     ;
  60.     return ((vehicleColor[vehicleid][0] = color1), (vehicleColor[vehicleid][1] = color2));
  61. }
  62.  
  63. stock createVehicle(vehicletype, Float: x, Float: y, Float: z, Float: rotation, color1, color2, respawn_delay)
  64. {
  65.     new
  66.         vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay)
  67.     ;
  68.     return ((vehicleColor[vehicleid][0] = color1), (vehicleColor[vehicleid][1] = color2));
  69. }
  70.  
  71. stock destroyVehicle(vehicleid)
  72. {
  73.     return DestroyVehicle(vehicleid);
  74. }
  75.  
  76. stock GetVehicleColor(vehicleid, &color1, &color2)
  77. {
  78.     return ((color1 = vehicleColor[vehicleid][0]), (color2 = vehicleColor[vehicleid][1]));
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement