Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. fnc_screen = {
  2. _object = _this select 0;
  3. _pfad = _this select 1;
  4. _sites = _this select 2;
  5. site = 0;
  6.  
  7. _object setObjectTexture[0, _pfad+str(site)+".jpg"];
  8.  
  9. _object addAction["Nächste Seite", {
  10. site = site+1;
  11. if(site > _sites) then {
  12. site = 0;
  13. };
  14. _object setObjectTexture[0, _pfad+str(site)+".jpg"];
  15. }, _object _pfad];
  16. _object addAction["Vorherige Seite", {
  17. site = site-1;
  18. if(site < 0) then {
  19. site = _sites;
  20. };
  21. _object setObjectTexture[0, _pfad+str(site)+".jpg"];
  22. }, _object _pfad];
  23. }
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. JK_fnc_screen = {
  32. params ["_target", "_sites"];
  33. _target setVariable ["JK_site", 0, true];
  34. _target addAction ["Next", {
  35. params ["_target", "", "", "_sites"];
  36. private _site = _target getVariable ["JK_site", 0];
  37. _site = (_site + 1) mod _sites;
  38. _target setVariable ["JK_site", _site, true];
  39. _target setObjectTextureGlobal [0, format ["path%1.jpg", _site]];
  40. }, _sites];
  41.  
  42. _target addAction ["Next", {
  43. params ["_target", "", "", "_sites"];
  44. private _site = _target getVariable ["JK_site", 0];
  45. _site = (_site - 1) mod _sites;
  46. _target setVariable ["JK_site", _site, true];
  47. _target setObjectTextureGlobal [0, format ["path%1.jpg", _site]];
  48. }, _sites];
  49. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement