Jump to content

-FW- Shaanguy

Member
  • Content Count

    42
  • Joined

  • Last visited

  • Medals

Everything posted by -FW- Shaanguy

  1. Make a new mission. Go to your mission, and create a init.sqf in init.sqf cash = 0; in init.sqf now make a trigger. ACTIVATION : Radio Alpha TEXT : Wallet TIME : REPEATEDLY Trigger ON ACT. hintSilent parseText format["<t size='1' font='Zeppelin33' color='#00FF3C'>you have $%1</t>", cash]; Here is the fun part. Now make a unit. name your unit "p1" your unit's init p1 AddAction ["<t color=""#00FF3C"">" +"Ak47 $100", "buy.sqf"]; go to mission folder, and make a buy.sqf In buy.sqf if (cash < 100) then { hint "You dont have enough money to buy this" } else { cash = cash - 100; gunbox addweaponcargo ["AK_47_M", 2]; gunbox addmagazinecargo ["30Rnd_762x39_AK47", 10]; hintSilent parseText format["<t size='1' font='Zeppelin33' color='#00FF3C'>You bought this gun</t>", d]; } ----------------------- Money add script cash = cash + 100 Money Remove script cash = cash - 100 ............... Make a Ammo box. Name it "gunbox" gunbox init clearweaponcargo gunbox; clearmagazinecargo gunbox; than go near the man you named "p1", remember to add money before you go near p1. Than buy the gun. And check the gunbox. Your weapon is in the gunbox. Any problems? Comment
  2. -FW- Shaanguy

    ArmA 2/3 money (Buy a gun)

    well yes and no you should probably use setVariable in multiplayer for more info here: https://community.bistudio.com/wiki/setVariable
  3. listbox, on click button any other way without using ( switch & case ), to find the item's script :D this is the code what i am using now :) switch (lbCurSel 1500) do { case 0: {hint "ITEM 1 = FILE";}; case 1: {hint "ITEM 2 = SOMETHING ELSE";}; default {hint "?";}; }; the problem here is, in a object's init, there is action = "Take File", when i take that file, it will be added to my listbox, but if I take a other item before "Take File" object, case 0 will be = ITEM 2 SOMETHING ELSE, and then if i use the action "Take File", case 1 will be the FILE :D, so i cant use case, is there a another method O_o ANY BROKEN WORD HERE? SORRY FOR THAT Solved = DID'NT WORK
  4. -FW- Shaanguy

    Dialog ListBox little help needed

    um checking, wow i am playing ArmA series like 6 years!, still didn't knew these dialog scripts i guess. x) By Fight9 that's right, well i am not good at dialog scripting. thank's for the more information in above fight9 THE NERD MODE
  5. is Profilenamespace is used only in singleplayer ? what i am trying to say is, if there is 5 player's in a multiplayer server i would like to use profilenamespace only one player, i just named a player : testman just wana use the profilenamespace only the testman, on multiplayer , but how could i do that? can i type something like this O_o :confused: (testman profilenamespace) setVariable ["SomeVariable", SomeValue]; would this work only for him?, just wana know some information about this ;D, hope can someone tell me more understandable information's, :)
  6. spawn_dialog.hpp spawn_defines.hpp spawn_settings.sqf // on load 2 = lbAdd [1500, "Rifleman"]; 1 = lbAdd [1500, "Sniper"]; spawn // button clicked // Nothing i wanted to make a listbox condition when i clicked the button, something like this: _lbselected = SPAWN_DIALOG lbIsSelected 1500; if (_lbselected == "Sniper") then {BLA BLA BLA}; something like that, this dialog is about before spawning, selecting classes, i did 2 , --- Rifleman & Sniper --- SOLVED = TRUE OTHER PROBLEM: well this post solved, but there is a other problem, here: http://forums.bistudio.com/showthread.php?190720-Dialog-ListBox-little-help-needed&p=2917440#post2917440 Sorry for a new thread, the other problem
  7. -FW- Shaanguy

    Dialog (Listbox) ??

    i posted another problem on this comment, but i couldn't get any replies, and this thread is really old, so i made a other thread here: http://forums.bistudio.com/showthread.php?190720-Dialog-ListBox-little-help-needed&p=2917440#post2917440
  8. -FW- Shaanguy

    Dialog (Listbox) ??

    thanks all, your all scripts worked
  9. TestIDS = []; TestIDS = TestIDS + [player addAction["<img image='MyPicture.paa' width='32' height='32'/> Pickup Something", "Pickup_Something.sqf", [], 1, false, false, "", "count (_name = nearestobjects [_target, ["CLASSNAME"], 5]) != 0 && _name getVariable 'something' = 4"]]; the problem here is that i cant give a name, i wanted to if the object is locked or getVariable "something" < 5 then the addaction appears, O_o ....................................
  10. Posted By t-800a oh yeah my mistake, but i tried this: player addAction [ "<img image='' width='32' height='32'/> Pickup Something", "Pickup_Something.sqf", [], 1, false, false, "", "{locked _x == true} count (nearestObjects [getPos _target,'C_Offroad_01_F',5]) > 0" ];
  11. used this: player addAction [ "<img image='' width='32' height='32'/> Pickup Something", "Pickup_Something.sqf", [], 1, false, false, "", "{_x getVariable 'test' > 1} count (nearestObjects [getPos _target,'Land_PaperBox_closed_F',5]) > 0" ]; i did this setVariable ["test" 1]; in the init of the object but still the addaction does not appears, am i doing something wrong here?
  12. -FW- Shaanguy

    Variable Checking Problem (Help!!)

    woah i think i am knowing some more information about variables, thanks JShock
  13. in my init.sqf all i want is to make my own inventory made up from script, like Wasteland Inventory, the problem here is, my two steps are correct, but step three is incorrect, i dont know how to check the item!? :butbut: in my scripted INV, it has to be like this if (player getVariable "INV" == "BLA1") then {BLA BLA BLA}; _otherItems = ["BLA1","BLA2","BLA3"]; player setVariable ["INV", _otherItems]; and then i went back to the game, and used this code Hint format ["%1", player getVariable "INV"]; well the hint works fine, it shows the inventory objects , so i putted a addaction to a unit, this addaction ["Check BLA1","Checker.sqf"]; Checker.sqf if (player getVariable "INV" == BLA1) then { Hint "you have BLA1!"; }; init.sqf // Worked! Hint // Worked! Checker.sqf: Checking if i have the item // Not working! I dont know how to check the item O_o, For Newbies: remember i am using my own inventory system made up from script, not game inventory xD
  14. -FW- Shaanguy

    Variable Checking Problem (Help!!)

    thanks all for the variable informations, i am not good at pro scripting variables, but i know the basics :D, i am having a other problem also, is there anyway to set a variable to that Bla1 like [["BLA1", 53],["BLA2", 45]] and remove like this >_> // 24- from BLA1, like that maybe, player setVariable ["INV", (player getVariable "INV") - ["BLA1", 24]];
  15. -FW- Shaanguy

    Variable Checking Problem (Help!!)

    Thanks This works if ("BLA1" in (player getVariable "INV")) then { Hint "you have BLA1!"; }; now to find a way how to remove a variable xD,
  16. I am trying to make if a player getVariable ["TestMode", 1], then the addaction appears to the player, but here is the script that i used, but it's not working, i am %100 sure, there is a problem, in this script. Here: I Used this in init.sqf TestIDS = []; TestIDS = TestIDS + [player addAction["<img image='' width='32' height='32'/> Test Mode (available)", "test_script.sqf", [], 1, false, false, "", "player getVariable 'TestMode' == '1'"]]; Any broken word in this post, then sorry for my bad english :)
  17. -FW- Shaanguy

    addaction condition (not working) help!

    Thanks TittErS It worked! :D Thanks for more information Heeeere's Johnny!
  18. i first open a paint and used my bucket to fill green color, and then i save as .jpg format into my Documents/Arma3/missions/mymissionfolder.Stratis and then i use this code: this setObjectTexture [0,"color.jpg"]; but i did'nt work, the vehicle was in white color, even units. So i thought that i did a mistake, so i watch a video i did everything he said, everyone said it worked, but it did'nt for me, i get that white color. so i edit wasteland mission folder and went inside the wastleand vehicle texture's, so i copied wasteland texture's for a test, and i use this code : this setObjectTexture [0,"TheTextureName.jpg"]; but still no working, what is happening to me!!!!???, in ArmA 3 Alpha i think i used setObjectTexture, it worked. But now it's not working!!!, i also joined a multiplayer wastleand server and then bought a vehicle with texture, i can see it's texture, is this my mistake?, but in Alpha i just used the same code it worked, but not now, I need a pro scripter's help!, not only pro :D, just wana know the why this is happening. I HATE BEEN VEHICLES IN WHITE COLOR :(
  19. i wana auto addaction to a vehicle that is locked, not unlocked
  20. I wanted to make high Command - Commander works for two players like , BLUFOR Commander and OPFOR Commander, but it does not work. It only selects one Commander. So i wanted to make two commander's , anybody know's how to make two commander for two sides then go on from comment
  21. -FW- Shaanguy

    ArmA III how do i save a variable

    how to save a variable?, when i join the server, and when the server restart i want my variable to get save when server restart or when i get dissconect, i am sure this script would solve. :cryy: _uid = getPlayerUID player; Oh and i made a addaction call "save", when i click it, and the save script must be in %1.sqf
  22. i followed this tutorial : and i did everything he did, but when i open my dialog, i cant see anything, it only creates the game cursor, but when i press Enter, one of my button function was executed, but i cant see anything, my description.ext my defines.hpp my dialogs.hpp this post is solved, i have to change every Dialog item position type to Safezone, when i make it as a grid, its not working, others have this problem?, then change your dialog item position type to Safezone :rolleyes:
  23. i am new to dialog creating, and i dont know how to use listbox, my list box id: 1500 i tried this from https://community.bistudio.com/wiki/lbAdd _index = lbAdd [1500, "First item"]; does not work O_o, ------------------------------ and seconary i wanted if i select a item from list box then {bla bla bla}
  24. -FW- Shaanguy

    Dialog Help

    it worked! :bounce3: i have been searching this problem like now 2 years ago, In ArmA 2, finally i knew it, big thanks to loki!
  25. just wana know how to execute a script, when (!alive player), i know in a trigger [repeatly] with condition: !alive player will work, but i want to make !alive player in a sqf file. I wrote many scripts in different ways, still not working ._, i want when I respawn, repeatly add a script, like adding a addaction or something
×