Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward OnFrakCarsLoad();
- public OnFrakCarsLoad()
- {
- new num_fields,num_rows;
- cache_get_data(num_rows,num_fields,dbhandle);
- printf("num_rows=%d,num_fields=%d",num_rows,num_fields);
- if(!num_rows)return 1;
- for(new i=0; i<num_rows; i++)
- {
- for(new id = 0; id<MAX_CARS; id++){
- //new id=getFreeCarID(); // Ob du wirklich id brauchst kann ich nicht unbedingt beurteilen.
- printf("id = %d , i = %d",id,i);
- fInfo[id][model]=cache_get_field_content_int(i,"ModelID",dbhandle);
- fInfo[id][fid]=cache_get_field_content_int(i,"Frakid",dbhandle);
- fInfo[id][f_c1]=cache_get_field_content_int(i,"Farbe1",dbhandle);
- fInfo[id][f_c2]=cache_get_field_content_int(i,"Farbe2",dbhandle);
- fInfo[id][f_x]=cache_get_field_content_float(i,"PosX",dbhandle);
- fInfo[id][f_y]=cache_get_field_content_float(i,"PosY",dbhandle);
- fInfo[id][f_z]=cache_get_field_content_float(i,"PosZ",dbhandle);
- fInfo[id][f_r]=cache_get_field_content_float(i,"PosR",dbhandle);
- fInfo[id][caridd]=cache_get_field_content_int(i,"carid",dbhandle);
- //cInfo[id][db_id]=cache_get_field_content_int(i,"id",dbhandle);
- //fInfo[id][kmstand]=cache_get_field_content_float(id,"kmstand",dbhandle);
- 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);
- printf("Fahrzeuge geladen und erstellt %d", /* fInfo[id][model] */ fInfo[id][id_x] );
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement