Advertisement
Guest User

GetVehicleInterior - by [DOG]irinel1996

a guest
Jun 14th, 2015
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.79 KB | None | 0 0
  1. //GetVehicleInterior by [DOG]irinel1996 - Hook method by Y_Less
  2.  
  3. native IsValidVehicle(vehicleid); //Esto no debería dar problemas, viene incluido en el SA-MP, pero no está definido (lo definimos aquí).
  4.  
  5. static stock
  6.         gvi_gInterior[MAX_VEHICLES];
  7.  
  8. stock gvi_LinkVehicleToInterior(vehicleid, interiorid)
  9. {
  10.     if (IsValidVehicle(vehicleid))
  11.     {
  12.         gvi_gInterior[vehicleid - 1] = interiorid;
  13.         return LinkVehicleToInterior(vehicleid, interiorid);
  14.     }
  15.     return 0;
  16. }
  17.  
  18. #if defined gvi_LinkVehicleToInterior
  19.     #undef LinkVehicleToInterior
  20. #else
  21.     #define _ALS_LinkVehicleToInterior
  22. #endif
  23. #define LinkVehicleToInterior gvi_LinkVehicleToInterior
  24.  
  25. stock GetVehicleInterior(vehicleid)
  26. {
  27.     if (IsValidVehicle(vehicleid))
  28.     {
  29.         return gvi_gInterior[vehicleid - 1];
  30.     }
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement