XADRENALINEIX

Avxry's Police Barricade

Jul 6th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.39 KB | None | 0 0
  1. #include <natives.h>
  2. #include <common.h>
  3. #include <types.h>
  4. #include <consts.h>
  5.  
  6. void GET_NETWORK_ID_FROM_OBJECT(Object obj, int *id);
  7. void SET_NETWORK_ID_CAN_MIGRATE(int id, boolean enabled);
  8. boolean IS_NETWORK_SESSION(void);
  9.  
  10. /// credits
  11. #define TITLE "~COL_NET_8~Airport Police Barricade"
  12. #define AUTHOR "~COL_NET_8~Created ~r~by ~PAD_A~~BLIP_23~~BLIP_44~~BLIP_27~~PAD_Y~"
  13.  
  14. Vehicle map_veh[9];
  15.  
  16. void print(char* text)
  17. {
  18.     CLEAR_PRINTS();
  19.     PRINT_STRING_WITH_LITERAL_STRING("string",text,3000,true);
  20. }
  21.  
  22. void create_vehicle(uint vehicle, float veh_x, float veh_y, float veh_z, float veh_h, Vehicle *veh_handle)
  23. {
  24.     if (IS_MODEL_IN_CDIMAGE(vehicle))
  25.     {
  26.         REQUEST_MODEL(vehicle);
  27.         while (!HAS_MODEL_LOADED(vehicle))
  28.             WAIT(0);
  29.  
  30.         CREATE_CAR(vehicle, veh_x, veh_y, veh_z, veh_handle, true);
  31.         SET_CAR_COORDINATES_NO_OFFSET(*veh_handle, veh_x, veh_y, veh_z);
  32.         SET_CAR_HEADING(*veh_handle, veh_h);
  33.  
  34.         SET_CAR_VISIBLE(*veh_handle, true);
  35.         SET_NEEDS_TO_BE_HOTWIRED(*veh_handle, false);
  36.         SET_CAR_CAN_BE_DAMAGED(*veh_handle, false);
  37.         SET_CAR_CAN_BE_VISIBLY_DAMAGED(*veh_handle, false);
  38.         SET_CAN_BURST_CAR_TYRES(*veh_handle, false);
  39.         SET_SIREN_WITH_NO_DRIVER(*veh_handle,true);
  40.         SWITCH_CAR_SIREN(*veh_handle,true);
  41.         FREEZE_CAR_POSITION(*veh_handle, true);
  42.        
  43.  
  44.         LOCK_CAR_DOORS(*veh_handle, VEHICLE_DOOR_LOCKED);
  45.         MARK_MODEL_AS_NO_LONGER_NEEDED(vehicle);
  46.     }
  47.     else
  48.         print("~y~Error! ~s~Vehicle could not be found.");
  49. }
  50.  
  51. void main(void){
  52.     THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
  53.  
  54.     #ifdef BLIPCOORDS
  55.     blip_location();
  56.     #endif
  57.  
  58.     #ifdef TITLE
  59.     print(TITLE); WAIT(2000);
  60.     #endif
  61.  
  62.     #ifdef AUTHOR
  63.     print(AUTHOR);
  64.     #endif
  65.  
  66.  
  67.     create_vehicle(0x79FBB0C5, 2210.5361, 673.8120, 5.4584, 76.65865, &map_veh[0]);
  68.     create_vehicle(0x79FBB0C5, 2205.8098, 676.4973, 5.4525, 225.01962, &map_veh[1]);
  69.     create_vehicle(0x79FBB0C5, 2343.3457, 514.7433, 5.6282, 151.7543, &map_veh[2]);
  70.     create_vehicle(0x79FBB0C5, 2343.2981, 509.3909, 5.6375, 16.6462, &map_veh[3]);
  71.     create_vehicle(0x79FBB0C5, 2344.7078, 266.1087, 5.6339, 39.2763, &map_veh[4]);
  72.     create_vehicle(0x79FBB0C5, 2342.4180, 271.1690, 5.6463, 187.9399, &map_veh[5]);
  73.     create_vehicle(0x79FBB0C5, 2232.6040, 179.6122, 5.6778, 1.7554, &map_veh[6]);
  74.     create_vehicle(0x79FBB0C5, 2232.5017, 180.0079, 5.6907, 0.7203, &map_veh[7]);
  75.     create_vehicle(0x8EB78F5A, 2238.2612, 181.1858, 5.4599, 275.7892, &map_veh[8]);
  76.  
  77.  
  78.    
  79.     while(true)
  80.         WAIT(0);
  81. }
Advertisement
Add Comment
Please, Sign In to add comment