mr_shadow 4 Posted October 5, 2013 Hey ebry1, can some1 tell how can I setvarriable to player who was selected from server list, to see all players I'm using dialog that is showing them, but dunno how to set it up for him. This is using to find the player { if (isPlayer _x) then { _Playeridx = lbAdd [2100,name _x]; }; }forEach playableUnits; } Share this post Link to post Share on other sites
mr_shadow 4 Posted October 5, 2013 Seriously? Nobody knows? Share this post Link to post Share on other sites
blackmamb 2 Posted October 5, 2013 Maybe it's just that nobody understands your question? Anyway, complaining about not getting an answer in a matter of hours seems a bit... rude. Nobody's your slave around here, people will answer if they know what to anwer and have time for it. Now I'd suggest you clarify your question a bit. Use the tags when pasting code in here.What do you mean by server list? What variable do you want to set? Are you talking about the actual player (yours)? Share this post Link to post Share on other sites
TAW_Yonose 11 Posted October 5, 2013 ebry1?? some1?? dunno?? god please, write everyone, someone and dont know, maybe people would help you then. just a tips Share this post Link to post Share on other sites
mr_shadow 4 Posted October 5, 2013 (edited) Maybe it's just that nobody understands your question? Anyway, complaining about not getting an answer in a matter of hours seems a bit... rude. Nobody's your slave around here, people will answer if they know what to anwer and have time for it.Now I'd suggest you clarify your question a bit. Use the tags when pasting code in here.What do you mean by server list? What variable do you want to set? Are you talking about the actual player (yours)?T9, I don't mean server list, I mean list of players on server, no I'm not talking about actual player because I know that I can use "player setvarriable"I have a dialog.hpp creating on keypress, there I've setted up to show all players from server, and I want to setvarriable to player who was selected in that list when pressing button in the dialog. The only thing that I can't fix is that varriable thing.It's like on life when you are selecting player to transfer him money. But life scripts will not help me. Even don't suggest it.[color=Silver][size=1]---------- Post added at 11:51 ---------- Previous post was at 11:49 ----------[/size][/color]ebry1?? some1?? dunno?? god please, write everyone, someone and dont know, maybe people would help you then. just a tips When you are going to speak 4 languages - tell me, I will give you tips. Edited October 5, 2013 by mr_shadow Share this post Link to post Share on other sites
blackmamb 2 Posted October 5, 2013 Then I'll assume you want to look at lbCurSel. When you are going to speak 4 languages - tell me, I will give you tips. I am. Still write better than a text. There was some sort of tacit rule here, that you had to avoid writing in any kind of slang or txt style. It may even be in the forum rules. Share this post Link to post Share on other sites
mr_shadow 4 Posted October 5, 2013 (edited) Useless. Stop spamming about the text that has been used, if you even don't remember the rules. Edited October 5, 2013 by mr_shadow Share this post Link to post Share on other sites
cuel 25 Posted October 5, 2013 Proper way to get help mate Share this post Link to post Share on other sites
Ranwer135 308 Posted October 5, 2013 (edited) Here :rolleyes: IMPORTANT: This will not work on groups if you do it from the init line (you'll experience locality issues). Do something like this instead: Put this on init line: b_GroupSetup = [group this, "3/B", "Tank", "Platoon"]execvm "grouptest.sqf";grouptest.sqf: if (isserver) then { private ["_GroupSelect", "_GroupDesig", "_GroupType", "_GroupSize"]; _GroupSelect = _this select 0; _GroupDesig = _this select 1; _GroupType = _this select 2; _GroupSize = _this select 3; _GroupSelect setvariable ["groupDetails", [_GroupDesig, _GroupType, _GroupSize, 0, [], ""], true]; }; Hope it helps, Ranwer EDIT: now if your a noob, its fine, ill guide you through it. the init at the top of the qoutes: b_GroupSetup = [group this, "3/B", "Tank", "Platoon"]execvm "grouptest.sqf"; the script above, you put it in your unit in the editor, to do so, double click. Now just copy the script on the "init:". After that, you will be needed to save the mission in order for this to work, just save it and call it anything you like. Now, the grouptest.sqf, you will be needed to go into your mission file, to do so go to your Documents/Arma3/profilename/mission name. now create a text file and rename the whole thing to grouptest.sqf . After that copy the below scripts above into the sqf file. Then your done! go back into the editor, click save and then preview (NOTE: YOU MAY HAVE TO COPY THE MISSION FILE TO MPMISSIONS IN YOUR PROFILE SO IT WILL WORK IN MP) Edited October 5, 2013 by Ranwer Share this post Link to post Share on other sites
tonic-_- 53 Posted October 5, 2013 If you phrased the question more then maybe better assistance could be given. Since it's involving Dialogs I could help you but I don't quite understand what you are wanting to do... Share this post Link to post Share on other sites
Ranwer135 308 Posted October 5, 2013 I dug up some of my old files in my computer and I found my extracted version of CCL LIFE. Here is a script you might be looking for: wantedrelease.sqf _deletekopfgeld = _this select 2; _civnumber = _civnumber+1; _civ = format["civ%1", _civnumber]; _civvar = call compile format["%1", _civ]; if (not(_civ call ISSE_UnitExists)) exitWith {role groupChat localize "STRS_player_not_ingame";}; if (_deletekopfgeld == 1) exitWith { format["kopfgeld_%1 = 0; %1_wanted = 0; %1_reason = [];", _civ] call broadcast; player groupChat format [localize "STRS_kopfgeld_entfernt", _civ]; }; if (_reason == "Description of crime") exitWith {player groupChat "You must enter a description of the crime!"}; call compile format ["_civarrestedvar = civ%1_arrest;",_civnumber]; if ((!(alive _civvar)) or (_civarrestedvar == 1)) exitWith {role groupChat format [localize "STRS_kopfgeld_nokopfgeld", _civ];}; format ["%2_wanted = 1; if(!(""%4"" in %2_reason))then{%2_reason = %2_reason + [""%4""]};server globalchat ""%3 is wanted for %4 by %1"";", name player, _civvar, name _civvar, _reason] call broadcast; Share this post Link to post Share on other sites
mr_shadow 4 Posted October 5, 2013 I dug up some of my old files in my computer and I found my extracted version of CCL LIFE.Here is a script you might be looking for: wantedrelease.sqf _deletekopfgeld = _this select 2; _civnumber = _civnumber+1; _civ = format["civ%1", _civnumber]; _civvar = call compile format["%1", _civ]; if (not(_civ call ISSE_UnitExists)) exitWith {role groupChat localize "STRS_player_not_ingame";}; if (_deletekopfgeld == 1) exitWith { format["kopfgeld_%1 = 0; %1_wanted = 0; %1_reason = [];", _civ] call broadcast; player groupChat format [localize "STRS_kopfgeld_entfernt", _civ]; }; if (_reason == "Description of crime") exitWith {player groupChat "You must enter a description of the crime!"}; call compile format ["_civarrestedvar = civ%1_arrest;",_civnumber]; if ((!(alive _civvar)) or (_civarrestedvar == 1)) exitWith {role groupChat format [localize "STRS_kopfgeld_nokopfgeld", _civ];}; format ["%2_wanted = 1; if(!(""%4"" in %2_reason))then{%2_reason = %2_reason + [""%4""]};server globalchat ""%3 is wanted for %4 by %1"";", name player, _civvar, name _civvar, _reason] call broadcast; Thanks a lot mate, but life script especially from arma 2 will not help me. Share this post Link to post Share on other sites
Ranwer135 308 Posted October 5, 2013 Ok, well some of the ArmA 2 scripts can be compatible. Anyway, ive sent 2 PM's to ya, 1 with a link of possible scripts you might wanna test out, and 1 with a link to a library of scripts. Ranwer Share this post Link to post Share on other sites
mr_shadow 4 Posted October 5, 2013 The problem has been solved, thanks to Tonic for helping. Share this post Link to post Share on other sites
kylania 568 Posted October 5, 2013 You should post your solution so that others can find it when they have a similar problem. Share this post Link to post Share on other sites
mr_shadow 4 Posted October 5, 2013 I'll just explain in a sense that I know, this may or may not work for you. But the file in which you are putting the players names (the dialog) when you fill the list of names do something like this. PHP Code: { lbAdd[2100,name _x]; lbSetData[2100,(lbSize 2100)-1,str(_x)]; } foreach (playableUnits); //This is a array of all playable units, replace it with whatever Then have a button on that dialog called 'Promote' and make it execute: PHP Code: private["_player"]; if(lbCurSel 2100 == -1) exitWith {hint "You did not select a player."}; _player = call compile format["%1",(lbData[2100,lbCurSel 2100])]; if(isNil "_player") exitWith {hint "Player doesn't exist?"}; [{player setVariable["ispromoted",1,true]; player execVM "want1.sqf"; hint "You have been promoted";},"BIS_fnc_call",_player,false] spawn BIS_fnc_param; You can put that code in a file like promote.sqf and have the button execVM it and it should promote the user. If it fails then it may be a issue with the call compile format, if that is the case then in the editor just name your playable units like unit_1,unit_2,unit_3,etc. I don't know if I understand everything well but that is a rough example of how to use a promoting like systemish with Dialogs. Code written by Tonic. Share this post Link to post Share on other sites
kylania 568 Posted October 5, 2013 I think you want BIS_fnc_MP and not BIS_fnc_param at the end there. Share this post Link to post Share on other sites
tonic-_- 53 Posted October 6, 2013 Damn, did I type param? Used to typing a different one as I have a custom BIS_fnc_MP Forceful habit with param... Share this post Link to post Share on other sites