Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. forward OnFrakCarsLoad();
  2. public OnFrakCarsLoad()
  3. {
  4. new num_fields,num_rows;
  5. cache_get_data(num_rows,num_fields,dbhandle);
  6. printf("num_rows=%d,num_fields=%d",num_rows,num_fields);
  7. if(!num_rows)return 1;
  8. for(new i=0; i<num_rows; i++)
  9. {
  10. for(new id = 0; id<MAX_CARS; id++){
  11. //new id=getFreeCarID(); // Ob du wirklich id brauchst kann ich nicht unbedingt beurteilen.
  12. printf("id = %d , i = %d",id,i);
  13. fInfo[id][model]=cache_get_field_content_int(i,"ModelID",dbhandle);
  14. fInfo[id][fid]=cache_get_field_content_int(i,"Frakid",dbhandle);
  15. fInfo[id][f_c1]=cache_get_field_content_int(i,"Farbe1",dbhandle);
  16. fInfo[id][f_c2]=cache_get_field_content_int(i,"Farbe2",dbhandle);
  17. fInfo[id][f_x]=cache_get_field_content_float(i,"PosX",dbhandle);
  18. fInfo[id][f_y]=cache_get_field_content_float(i,"PosY",dbhandle);
  19. fInfo[id][f_z]=cache_get_field_content_float(i,"PosZ",dbhandle);
  20. fInfo[id][f_r]=cache_get_field_content_float(i,"PosR",dbhandle);
  21. fInfo[id][caridd]=cache_get_field_content_int(i,"carid",dbhandle);
  22. //cInfo[id][db_id]=cache_get_field_content_int(i,"id",dbhandle);
  23. //fInfo[id][kmstand]=cache_get_field_content_float(id,"kmstand",dbhandle);
  24. fInfo[id][id_x]=CreateVehicle(fInfo[id][model],fInfo[id][f_x],fInfo[id][f_y],fInfo[id][f_z],fInfo[id][f_r],fInfo[id][f_c1],fInfo[id][f_c2],-1);
  25. printf("Fahrzeuge geladen und erstellt %d", /* fInfo[id][model] */ fInfo[id][id_x] );
  26. }
  27.  
  28. }
  29. return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement