Well,i need very quick help in this:
Code:sleep 1; if (isNil 'CSLA_noRandomNumbers') then {CSLA_noRandomNumbers = false}; if !CSLA_noRandomNumbers then { _vehiculum = _this; _via = '\csla_opn\data\cisla_white_armour\'; if (_vehiculum isKindOf 'AIR') then {_via = '\csla_opn\data\cisla_black_big\'}; _posX = 1; if (abs((getPos _vehiculum) select 0) > 1) then {_posX = abs((getPos _vehiculum) select 0)}; _posY = 1; if (abs((getPos _vehiculum) select 1) > 1) then {_posY = abs((getPos _vehiculum) select 1)}; _posZ = 1; if (abs((getPosASL _vehiculum) select 2) > 1) then {_posZ = abs((getPosASL _vehiculum) select 2)}; _numero = floor(_posX*_posY*_posZ); _numero = toArray(str(_numero MOD 10000)); _numero0 = '0'; if (count(_numero) > 3) then {_numero0 = toString[_numero select 3]}; _numero1 = '0'; if (count(_numero) > 2) then {_numero1 = toString[_numero select 2]}; _numero2 = '0'; if (count(_numero) > 1) then {_numero2 = toString[_numero select 1]}; _numero3 = '0'; if (count(_numero) > 0) then {_numero3 = toString[_numero select 0]}; _vehiculum setObjectTexture [0, _via + _numero0 + '.paa']; _vehiculum setObjectTexture [1, _via + _numero1 + '.paa']; _vehiculum setObjectTexture [2, _via + _numero2 + '.paa']; if (_vehiculum isKindOf 'AIR') then {_vehiculum setObjectTexture [3, _via + _numero3 + '.paa']} else {_vehiculum setObjectTexture [3, _via + 'sign.paa']}; };I need to get these to have functionality(mostly "mytime" i think) from this:Code:; Number Randomizer _unit = _this select 0 ?norandomnumbers: Exit _unit setObjectTexture [3, "\csla_apc\signs\sign.paa"], goto "n1" #n1 _nrand = random(100) ?_nrand > 90: _unit setObjectTexture [0, "\csla_apc\signs\9.paa"], goto "n2" ?_nrand > 80: _unit setObjectTexture [0, "\csla_apc\signs\8.paa"], goto "n2" ?_nrand > 70: _unit setObjectTexture [0, "\csla_apc\signs\7.paa"], goto "n2" ?_nrand > 60: _unit setObjectTexture [0, "\csla_apc\signs\6.paa"], goto "n2" ?_nrand > 50: _unit setObjectTexture [0, "\csla_apc\signs\5.paa"], goto "n2" ?_nrand > 40: _unit setObjectTexture [0, "\csla_apc\signs\4.paa"], goto "n2" ?_nrand > 30: _unit setObjectTexture [0, "\csla_apc\signs\3.paa"], goto "n2" ?_nrand > 20: _unit setObjectTexture [0, "\csla_apc\signs\2.paa"], goto "n2" ?_nrand > 10: _unit setObjectTexture [0, "\csla_apc\signs\1.paa"], goto "n2" ?_nrand > 0: _unit setObjectTexture [0, "\csla_apc\signs\0.paa"], goto "n2" #n2 _nrand = random(100) ?_nrand > 90: _unit setObjectTexture [1, "\csla_apc\signs\9.paa"], goto "n3" ?_nrand > 80: _unit setObjectTexture [1, "\csla_apc\signs\8.paa"], goto "n3" ?_nrand > 70: _unit setObjectTexture [1, "\csla_apc\signs\7.paa"], goto "n3" ?_nrand > 60: _unit setObjectTexture [1, "\csla_apc\signs\6.paa"], goto "n3" ?_nrand > 50: _unit setObjectTexture [1, "\csla_apc\signs\5.paa"], goto "n3" ?_nrand > 40: _unit setObjectTexture [1, "\csla_apc\signs\4.paa"], goto "n3" ?_nrand > 30: _unit setObjectTexture [1, "\csla_apc\signs\3.paa"], goto "n3" ?_nrand > 20: _unit setObjectTexture [1, "\csla_apc\signs\2.paa"], goto "n3" ?_nrand > 10: _unit setObjectTexture [1, "\csla_apc\signs\1.paa"], goto "n3" ?_nrand > 0: _unit setObjectTexture [1, "\csla_apc\signs\0.paa"], goto "n3" #n3 _nrand = random(100) ?_nrand > 90: _unit setObjectTexture [2, "\csla_apc\signs\9.paa"], Exit ?_nrand > 80: _unit setObjectTexture [2, "\csla_apc\signs\8.paa"], Exit ?_nrand > 70: _unit setObjectTexture [2, "\csla_apc\signs\7.paa"], Exit ?_nrand > 60: _unit setObjectTexture [2, "\csla_apc\signs\6.paa"], Exit ?_nrand > 50: _unit setObjectTexture [2, "\csla_apc\signs\5.paa"], Exit ?_nrand > 40: _unit setObjectTexture [2, "\csla_apc\signs\4.paa"], Exit ?_nrand > 30: _unit setObjectTexture [2, "\csla_apc\signs\3.paa"], Exit ?_nrand > 20: _unit setObjectTexture [2, "\csla_apc\signs\2.paa"], Exit ?_nrand > 10: _unit setObjectTexture [2, "\csla_apc\signs\1.paa"], Exit ?_nrand > 0: _unit setObjectTexture [2, "\csla_apc\signs\0.paa"], Exit
I hope this time someone will even try to help.Code:private ["_tex", "_number", "_nr", "_mytime"]; // e.g.: init="test=[this, 123] execVM ""\smurfc_era\assignNumber.sqf"";"; _tex = _this select 0; _number = _this select 1; if (_number < 0) then { _number=(((getpos _tex select 0)+(getpos _tex select 1)*3+(time-(time Mod 5))*17)Mod 1000)-1; }; // set _mytime to zero to assign the texture once _mytime=0; while {true} do { sleep 0.1; waitUntil {time != 0}; // if load, time is reset if (_mytime < 2) then { _nr = (_number / 100) Mod 10; _nr = _nr - (_nr Mod 1); switch (format ["%1", _nr]) do { case "0": { _tex setObjectTexture [3,"\smurfc_era\numbers\zero"];}; case "1": { _tex setObjectTexture [3,"\smurfc_era\numbers\one"];}; case "2": { _tex setObjectTexture [3,"\smurfc_era\numbers\two"];}; case "3": { _tex setObjectTexture [3,"\smurfc_era\numbers\three"];}; case "4": { _tex setObjectTexture [3,"\smurfc_era\numbers\four"];}; case "5": { _tex setObjectTexture [3,"\smurfc_era\numbers\five"];}; case "6": { _tex setObjectTexture [3,"\smurfc_era\numbers\six"];}; case "7": { _tex setObjectTexture [3,"\smurfc_era\numbers\seven"];}; case "8": { _tex setObjectTexture [3,"\smurfc_era\numbers\eight"];}; default { _tex setObjectTexture [3,"\smurfc_era\numbers\nine"];}; }; _nr = (_number / 10) Mod 10; _nr = _nr - (_nr Mod 1); switch (format ["%1", _nr]) do { case "0": { _tex setObjectTexture [4,"\smurfc_era\numbers\zero"];}; case "1": { _tex setObjectTexture [4,"\smurfc_era\numbers\one"];}; case "2": { _tex setObjectTexture [4,"\smurfc_era\numbers\two"];}; case "3": { _tex setObjectTexture [4,"\smurfc_era\numbers\three"];}; case "4": { _tex setObjectTexture [4,"\smurfc_era\numbers\four"];}; case "5": { _tex setObjectTexture [4,"\smurfc_era\numbers\five"];}; case "6": { _tex setObjectTexture [4,"\smurfc_era\numbers\six"];}; case "7": { _tex setObjectTexture [4,"\smurfc_era\numbers\seven"];}; case "8": { _tex setObjectTexture [4,"\smurfc_era\numbers\eight"];}; default { _tex setObjectTexture [4,"\smurfc_era\numbers\nine"];}; }; _nr = (_number) Mod 10; _nr = _nr - (_nr Mod 1); switch (format ["%1", _nr]) do { case "0": { _tex setObjectTexture [5,"\smurfc_era\numbers\zero"];}; case "1": { _tex setObjectTexture [5,"\smurfc_era\numbers\one"];}; case "2": { _tex setObjectTexture [5,"\smurfc_era\numbers\two"];}; case "3": { _tex setObjectTexture [5,"\smurfc_era\numbers\three"];}; case "4": { _tex setObjectTexture [5,"\smurfc_era\numbers\four"];}; case "5": { _tex setObjectTexture [5,"\smurfc_era\numbers\five"];}; case "6": { _tex setObjectTexture [5,"\smurfc_era\numbers\six"];}; case "7": { _tex setObjectTexture [5,"\smurfc_era\numbers\seven"];}; case "8": { _tex setObjectTexture [5,"\smurfc_era\numbers\eight"];}; default { _tex setObjectTexture [5,"\smurfc_era\numbers\nine"];}; }; }; _mytime=time; sleep 1; };
HOME
Reply With Quote


