DrPawn

autohaus laden beispiel

Feb 24th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. stock AHLaden()
  2. {
  3. new anzahl;//zählt die AutoHäuser die geladen Werden
  4. for(new a=0;a<sizeof AHausInfo;a++)
  5. {
  6. format(datei,sizeof datei,ahvz,a);// formatier das verzeichnis mit der autohausID als ein string
  7. if(dini_Exists(datei))// wenn die datei mit dem name AutoHausNrXY vorhanden ist
  8. {
  9. // Werden die Werde aus der Datei der Variablen zugewiesen
  10. anzahl++;
  11. format(AHausInfo[a][AHName],46,dini_Get(datei,"AutohausName"));
  12. AHausInfo[a][AHPos][0]=dini_Float(datei,"AutohausPosX");
  13. AHausInfo[a][AHPos][1]=dini_Float(datei,"AutohausPosY");
  14. AHausInfo[a][AHPos][2]=dini_Float(datei,"AutohausPosZ");
  15. AHausInfo[a][AHSchloss]=dini_Int(datei,"AutohausSchloss");
  16. AHausInfo[a][AHKasse]=dini_Int(datei,"AutohausKasse");
  17. UpdateAH(a,"all");
  18. }
  19. }
  20. if(anzahl>0){printf("[Dr.Pawn Fahrzeug Script][Autohäuser]Es konnten %i Autohäuser geladen werden.",anzahl);}
  21. else {print("[Dr.Pawn Fahrzeug Script][Autohäuser]Es konnten keine Autohäuser geladen werden.");}
  22. return 1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment