Jump to content

nickcage

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Everything posted by nickcage

  1. Hi all I'm creating a store with the GUI editor, I can find out what's wrong with the code I'm hoping someone can spot it. If you could provide a better code for this would be great? this script is linked to button action. _unit = player; _Crate = PlayerStorage; _playerweap = primaryWeapon player; _cash = Daddies; _cost = 120; Ak-12 = ["arifle_AK12_F"]; buttonSetAction [1601, {if (player hasWeapon "playerweap") then { _unit action ["PutWeapon", _Crate, primaryWeapon _unit]; Hint "Weapon Stored"; } then { if (_cash >= _cost) then { MoneySystem = MoneySystem - 120; player addweapon "arifle_AK12_F"; } else { Hint "Not Enough Dosh"; } };
  2. nickcage

    What am I doing Wrong?

    if ((currentWeapon player == (primaryWeapon player)) and (_cash >= _cost)) then { _SIMP action ["PutWeapon", _Crate, primaryWeapon _SIMP]; Hint "Weapon Stored"; sleep 4; hintSilent ""; }; if (_cash >= _cost) then { MoneySystem = MoneySystem - 120; sleep 3; player addweapon "arifle_AK12_F" } else { Hint "Not Enough Dosh"; sleep 4; hintSilent ""; }; I am trying master
  3. nickcage

    What am I doing Wrong?

    2nd _playerWeapon is not a string, its a local variable.
  4. nickcage

    What am I doing Wrong?

    Code structuration DRY: Don't Repeat Yourself. If you write the same code block or the same logic many times, export this code as a function and use parameters with it. If your code has too many levels, it is time to split and rethink it (e.g if (a) then { if (b) then { if (c) then { /* etc */ }; }; };...) Do NOT use macros as functions - these hinder readability. Use functions instead. Thankyou.
  5. yeah both should work. I'm only new to C++ thanks.
  6. hi I'm using the https://community.bistudio.com/wiki/profileNameSteam command to display it as a string on RSC text box my init.sqf: _mySteamProfileName = profileNameSteam; My command line: _cuck = _mySteamProfileName; _dialog = findDisplay -9; _ctrl = _dialog displayCtrl 1000; _ctrl ctrlSetText format ["The Cuck is: %1", _cuck]; Does it not produce a string?
  7. Your an absolute legend. I totally forgot about public variables on connected machines. i'll remember to double check my work
  8. Tried it doesn't work thanks for trying.
  9. So what I'm trying to do is display the steam username of the person that plays this scenario on a dialog textbox. Anyone able to fix my janky code so it executes and displays the users steam name on a textbox? This might not even be possible?
  10. Its a variable right? that displays as a string? So what your saying is is should define it a public variable?
  11. Hi all im pretty tired of CUP'S bullshit when it comes to executing VM script's. Rant aside here is my SQF file titled "introscene.sqf": titleCut ["", "BLACK FADED", 999]; titleText ["Pre-Loading Objects, stablizing frame rate", "PLAIN"]; playMusic "music17" sleep 4; 0 = createDialog "IntroCard"; titlecut [" ","BLACK IN",2]; _camera = "camera" camcreate [0,0,0]; _camera cameraeffect ["internal","back"]; _angle = 0; _camera camSetpos [4439.47,4654.71,37.0427]; _camera camSettarget [4444.59,4517.27,19.0443]; _camera camCommit 0; while {_angle < 360} do { _angle = _angle + 1; _camera camSetRelPos [10*cos(_angle),10*sin(_angle),4]; _camera camCommit 0.1; sleep 10; _camera camSetpos [4236.59,6745.48,55.1633]; _camera camSettarget [4173.15,6814.03,16.4087]; _camera camCommit 0; while {_angle < 360} do { _angle = _angle + 1; _camera camSetRelPos [10*cos(_angle),10*sin(_angle),4]; _camera camCommit 0.1; sleep 10; closeDialog 2; camDestroy _camera; }; I have this as my init Field: player execVM "introscene.sqf"; I have CUP terrains installed which i think has changed the coding language. just need at Init command that will Behave like a execVM command for CUP. I keep getting a generic error for the sleep commands.
  12. nickcage

    Need Help

    Yep i just noticed that after looking over my code. well i'm an idiot. Sorry CUP developers you have redeemed yourself.
×