PaulCastellano

onvehiclespawn

Mar 1st, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. public OnVehicleSpawn(vehicleid)
  2. {
  3. VehProtection(vehicleid);
  4. new vFile[50];
  5. for(new i = 0; i < sizeof(VoziloInfo); i++)
  6. {
  7. format(vFile, sizeof(vFile), AUTO_FILE, i);
  8. if(fexist(vFile))
  9. {
  10. if(vehicleid == VoziloInfo[i][vID])
  11. {
  12. if(VoziloInfo[i][vSpawn] == 1) SetVehicleVirtualWorld(vehicleid, 100);
  13. for(new id = 1; id <= 17; id++)
  14. {
  15. if(VoziloInfo[i][vMod][id]!=0) { AddVehicleComponent(vehicleid,VoziloInfo[i][vMod][id]); }
  16. }
  17. if(VoziloInfo[i][vMod][0]>=0) { ChangeVehiclePaintjob(vehicleid,VoziloInfo[i][vMod][0]); }
  18. }
  19. }
  20. }
  21. return 1;
  22. }
Add Comment
Please, Sign In to add comment