Advertisement
PaulCastellano

VehProtection

Mar 1st, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. forward VehProtection(vehicleid);
  2. public VehProtection(vehicleid)
  3. {
  4. new Fajl[64];
  5. for(new i = 0; i < sizeof(VoziloInfo); i++)
  6. {
  7. format(Fajl, sizeof(Fajl), AUTO_FILE, i);
  8. if(!fexist(Fajl))
  9. {
  10. if(VoziloInfo[i][vID] == vehicleid)
  11. {
  12. if(VoziloInfo[i][vSpawn] == 1) SetVehicleVirtualWorld(vehicleid, 100);
  13. }
  14. }
  15. }
  16. for(new i = 0; i < sizeof(MotorInfo); i++)
  17. {
  18. format(Fajl, sizeof(Fajl), MOTOR_FILE, i);
  19. if(!fexist(Fajl))
  20. {
  21. if(MotorInfo[i][mID] == vehicleid)
  22. {
  23. if(MotorInfo[i][mSpawn] == 1) SetVehicleVirtualWorld(vehicleid, 100);
  24. }
  25. }
  26. }
  27. for(new i = 0; i < sizeof(AvionInfo); i++)
  28. {
  29. format(Fajl, sizeof(Fajl), AVION_FILE, i);
  30. if(!fexist(Fajl))
  31. {
  32. if(AvionInfo[i][avID] == vehicleid)
  33. {
  34. if(AvionInfo[i][avSpawn] == 1) SetVehicleVirtualWorld(vehicleid, 100);
  35. }
  36. }
  37. }
  38. for(new i = 0; i < sizeof(PlovilaInfo); i++)
  39. {
  40. format(Fajl, sizeof(Fajl), PLOVILA_FILE, i);
  41. if(!fexist(Fajl))
  42. {
  43. if(PlovilaInfo[i][plID] == vehicleid)
  44. {
  45. if(PlovilaInfo[i][plSpawn] == 1) SetVehicleVirtualWorld(vehicleid, 100);
  46. }
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement