Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fnc_screen = {
- _object = _this select 0;
- _pfad = _this select 1;
- _sites = _this select 2;
- site = 0;
- _object setObjectTexture[0, _pfad+str(site)+".jpg"];
- _object addAction["Nächste Seite", {
- site = site+1;
- if(site > _sites) then {
- site = 0;
- };
- _object setObjectTexture[0, _pfad+str(site)+".jpg"];
- }, _object _pfad];
- _object addAction["Vorherige Seite", {
- site = site-1;
- if(site < 0) then {
- site = _sites;
- };
- _object setObjectTexture[0, _pfad+str(site)+".jpg"];
- }, _object _pfad];
- }
- JK_fnc_screen = {
- params ["_target", "_sites"];
- _target setVariable ["JK_site", 0, true];
- _target addAction ["Next", {
- params ["_target", "", "", "_sites"];
- private _site = _target getVariable ["JK_site", 0];
- _site = (_site + 1) mod _sites;
- _target setVariable ["JK_site", _site, true];
- _target setObjectTextureGlobal [0, format ["path%1.jpg", _site]];
- }, _sites];
- _target addAction ["Next", {
- params ["_target", "", "", "_sites"];
- private _site = _target getVariable ["JK_site", 0];
- _site = (_site - 1) mod _sites;
- _target setVariable ["JK_site", _site, true];
- _target setObjectTextureGlobal [0, format ["path%1.jpg", _site]];
- }, _sites];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement