Guest User

Untitled

a guest
Aug 11th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1.  
  2. public sauverPoubelle(const idInfo)
  3. {
  4. new fichier[128];
  5. format(fichier, 128, FICHIER_POUBELLE, idInfo);
  6. if(!fexist(fichier))
  7. dini_Create(fichier);
  8. new i = idInfo;
  9. dini_IntSet(fichier, "UniqID", InfoPoubelle[i][pUniqID]);
  10. dini_IntSet(fichier, "PoubID", InfoPoubelle[i][pPoubID]);
  11. dini_FloatSet(fichier, "SpawnX", InfoPoubelle[i][pSpawnX]);
  12. dini_FloatSet(fichier, "SpawnY", InfoPoubelle[i][pSpawnY]);
  13. dini_FloatSet(fichier, "SpawnZ", InfoPoubelle[i][pSpawnZ]);
  14. dini_FloatSet(fichier, "SpawnA", InfoPoubelle[i][pSpawnA]);
  15. dini_BoolSet(fichier, "coffre", InfoPoubelle[i][coffre]);
  16. dini_IntSet(fichier, "slotsCoffre", InfoPoubelle[i][slotsCoffre]);
  17. if(InfoPoubelle[i][coffre])
  18. {
  19. format(fichier, 128, FICHIER_COFFRESB, i);
  20. if(!fexist(fichier))
  21. dini_Create(fichier);
  22. for(new c = 0; c < InfoPoubelle[i][slotsCoffre]; c++)
  23. {
  24. format(stringtmp, TAILLE_STRING_CLASSIC, "coffre_slotLibre%d", c);
  25. dini_BoolSet(fichier, stringtmp, InfoCoffrePoub[i][c][slotLibre]);
  26. if(!InfoCoffrePoub[i][c][slotLibre])
  27. {
  28. format(stringtmp, TAILLE_STRING_CLASSIC, "coffre_nomItem%d", c);
  29. dini_Set(fichier, stringtmp, InfoCoffrePoub[i][c][nomItem]);
  30.  
  31. format(stringtmp, TAILLE_STRING_CLASSIC, "coffre_quantite%d", c);
  32. dini_IntSet(fichier, stringtmp, InfoCoffrePoub[i][c][quantite]);
  33. }
  34. }
  35. }
  36. return 1;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment