Advertisement
2ky

Untitled

2ky
Feb 18th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. public OnGameModeInit()
  2. {
  3. new
  4. facStr[32],
  5. vehStr[32]
  6. ;
  7.  
  8. for( new f = 1; f < MAX_FACTIONS; f++ )
  9. {
  10. format(facStr, sizeof(facStr), "RPMod/Factions/%d.ini", f);
  11. if(fexist(facStr))
  12. {
  13. INI_ParseFile(facStr, "LoadFaction_%s", .bExtra = true, .extra = f);
  14. printf("[LOAD] Faction ID: %d | Name: %s | Type: %d", f, facInfo[f][facName], facInfo[f][facType]);
  15. }
  16. }
  17.  
  18. for( new v; v < MAXIMUM_VEHICLES; v++ )
  19. {
  20. format(vehStr, sizeof(vehStr), "RPMod/Vehicles/%d.ini", v);
  21.  
  22. if(fexist(vehStr))
  23. {
  24. INI_ParseFile(vehStr, "LoadVehicle_%s", .bExtra = true, .extra = v);
  25. VehiclePID[v] = CreateVehicle(vehInfo[v][ModelID], vehInfo[v][Pos][0], vehInfo[v][Pos][1], vehInfo[v][Pos][2], vehInfo[v][Pos][3], vehInfo[v][Colour][0], vehInfo[v][Colour][1], 360000);
  26. printf("[LOAD] Vehicle ID %d loaded. Model: %d | Colours: %d, %d | Owner: %s", VehiclePID[v], vehInfo[v][ModelID], vehInfo[v][Colour][0], vehInfo[v][Colour][1], vehInfo[v][Owner]);
  27. }
  28. else
  29. {
  30. //Do nothing - we need it to continue the loop. Do NOT return here.
  31. }
  32. }
  33.  
  34. AddPlayerClass(0, 0, 0,0,0,0,0,0,0,0,0);
  35. return true;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement