lmapper Posted February 23, 2014 Report Share Posted February 23, 2014 Why it doesnt work in mission for EMS ? It show to all players "You havent radio". Please, help. if ("ItemRadio" in items Player) then { [nil,nil,rTitleText,"You have radio", "PLAIN",10] call RE; } else { [nil,nil,rTitleText,"You havent radio", "PLAIN",10] call RE; }; Link to comment Share on other sites More sharing options...
0 TheVampire Posted February 23, 2014 Report Share Posted February 23, 2014 ItemRadio is a weapon, as are all toolbox items, not a magazine item. It should be weapons player instead of items player. Link to comment Share on other sites More sharing options...
0 lmapper Posted February 23, 2014 Author Report Share Posted February 23, 2014 ItemRadio is a weapon, as are all toolbox items, not a magazine item. It should be weapons player instead of items player. I think no, but i check it and write right way. Thanks for help guys. Link to comment Share on other sites More sharing options...
0 lmapper Posted February 24, 2014 Author Report Share Posted February 24, 2014 This? Link to comment Share on other sites More sharing options...
0 Axe Cop Posted February 24, 2014 Report Share Posted February 24, 2014 1. why do you use RE (remote execution)? that will send the text to ALL players, I think you just want to show the message for the current player? :D just use titleText locally: titleText ["You have radio", "PLAIN"]; no need for RE? "ItemRadio" in items player should work, but I don't know, maybe because you used the wrong text message you could never see it yourself (RE is only visible for all other players, not yourself) lmapper 1 Link to comment Share on other sites More sharing options...
0 lmapper Posted February 24, 2014 Author Report Share Posted February 24, 2014 1. why do you use RE (remote execution)? that will send the text to ALL players, I think you just want to show the message for the current player? :D just use titleText locally: titleText ["You have radio", "PLAIN"]; no need for RE? "ItemRadio" in items player should work, but I don't know, maybe because you used the wrong text message you could never see it yourself (RE is only visible for all other players, not yourself) Initially I thought that the blame for the function "RE", but when I gave all players the radio - all the same wrote that no radio. Logically, my code needs to check the presence of all the radio, of all the players to choose one, and depending on the availability of this radio player - send one message to all "have" or "haven't". But if everyone has a radio - why it is all the same wrote that it is not present? Thank you again! p.s. Sry for my bad english lang. :) Link to comment Share on other sites More sharing options...
0 Axe Cop Posted February 24, 2014 Report Share Posted February 24, 2014 well maybe you should describe what you actually want to do in the first place? do you want to contact other placers with the radio or what is it you want? :D what you do in your first script is you check for a radio on the current player who executes the script and then send a text to all players (these players do not check if they have a radio) if you want to check every player for a radio you can't use RE at all, but need to do a custom public variable and check it after the message is received by each player and not before. that is easy to do in Arma, but still not the easiest script do do if you have no prior knowledge of network programming and Arma scripting :( what I mean by that is that it will not be easy for a beginner to do a script like that. Link to comment Share on other sites More sharing options...
0 lmapper Posted February 24, 2014 Author Report Share Posted February 24, 2014 well maybe you should describe what you actually want to do in the first place? do you want to contact other placers with the radio or what is it you want? :D what you do in your first script is you check for a radio on the current player who executes the script and then send a text to all players (these players do not check if they have a radio) if you want to check every player for a radio you can't use RE at all, but need to do a custom public variable and check it after the message is received by each player and not before. that is easy to do in Arma, but still not the easiest script do do if you have no prior knowledge of network programming and Arma scripting :( what I mean by that is that it will not be easy for a beginner to do a script like that. Link to comment Share on other sites More sharing options...
0 Defent Posted February 24, 2014 Report Share Posted February 24, 2014 I wrote something similar some time ago: ////RADIO TRANS-MISSION get it? it's a pun. // This part is inpsired by the selfbloodbag by Krixes @ Opendayz and Player 2 @ ZombZ.net private ["_cordinates","_nocoridnates","_mradio"]; _mradio = (magazines player) + (weapons player); if ("ItemRadio" in _mradio) then { hasRadio = true; } else { hasRadio = false; }; if(hasRadio && _canDo) then { titleText [format["Mission info, check your map!"], "PLAIN DOWN"] call RE; // you probably want RE.. why would you want to transmit a message to yourself? hasradiomarker = _cordinates; publicVariable "hasradiomarker"; [] execVM "hasradio_marker.sqf"; } else { titleText [format["Unknown mission (you have no radio!)"], "PLAIN DOWN"]; // This one should probably not be RE since some people don't have radios.. noradiomarker = _nocordinates; publicVariable "noradiomarker"; [] execVM "noradio_marker.sqf"; }; ////I'll just show myself out. Note: This will not work, it's just the general idea. This would execute the script everyime someone gets a radio.. or has one. In the mission I made I included a fn_selfaction script instead which, when you got a radio opend a scroll menu to use it and a mission would appear on the map. Link to comment Share on other sites More sharing options...
0 Tobias Solem Posted April 6, 2014 Report Share Posted April 6, 2014 Were you ever able to solve this, because I'm at the same juncture. I can't get anywhere. :/ Link to comment Share on other sites More sharing options...
Question
lmapper
Why it doesnt work in mission for EMS ?
It show to all players "You havent radio".
Please, help.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now