Search the Community
Showing results for tags 'from'.
Found 3 results
-
Using a variable from another script
fubister posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I can't figure out how to use same variable on 2 scripts, I'm guessing it's simple but I think I've tried everything with no luck, here is what I've got. 1.sqf private ["_uid","_otherplayer"]; _uid = getPlayerUID player; _otherplayer = lbData[3004,lbCurSel (3004)]; //some function [player,_uid] remoteExecCall ["client_fnc_rec",_otherplayer]; Up till now everything woks as it should including the remote exec for selected player. What I want is to use _uid from 1.sqf in 2.sqf and have not idea how to do that. 2.sqf private ["_uid"]; _uid = ??? //some function -
Hello, I've been succesfully using this "safezone.sqf" script to restrict small arms fire, throwing grenades and placing explosives inside a "spawn protected area" which essentially is a trigger area. I assume the script itself is an evolution of grenadeStop.sqf by Bake or it could be from completely different origins who knows. In short what the script does is that it will delete the fired projectile, thrown grenade or placed explosive and display a message that can be customized freely with #define MESSAGE "Type your message here" To add the restriction to certain projectile, grenade or explosive the classname needs to be typed in the SPAWN_Restriction = -field I was trying to use the aforementioned script to also restrict vehicles from firing their guns inside the spawn protected area but it is so that declaring the ammo classnames (that are used in different vehicles) in the SPAWN_Restriction = ["insert ammo classname here"]; is not enough to get the job done. The question here would be that: whether the safezone.sqf can be adapted in a way so that using vehicle guns (or "turrets") to shoot inside the spawn protected area would also be restricted? (if so, any suggestion on how-to?) OR if I should start looking for a completely different approach with the issue at hand (if so, any suggestions what should that approach then be)? There weren't too many discussions available that did share somekind of similarity with what I'm asking here. I actually only found this and this but well, for me those didn't give the comforting "I got this and I know I can do this" feeling. Thus here I am, asking questions. Greetings Asmodeuz
- 2 replies
-
- fired
- addeventhandler
- (and 4 more)
-
3rd Person Script, Kick player if they press numpad enter more than 3 times?
Sokoloft posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I found this script at armahaulic = www.armaholic.com/page.php?id=26369 With a minute amount of editing, I made it do what I want, which is just force first person on the player. // Author - Sokoloft & Rodeostar42 @ www.armaholic.com/page.php?id=26369 //3rdPersonView.sqf if (!isDedicated) then { waitUntil {!isNull (findDisplay 46)}; if( (difficultyOption "thirdPersonView")isEqualTo 0) then { while {true} do {}; }; if( (difficultyOption "thirdPersonView")isEqualTo 1) then { while {true} do { waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"}; if (((vehicle player) == player) && (speed ( player)) >= 0) then { player switchCamera "INTERNAL"; }; sleep 0.1; }; }; }; How would I go about making it to were the player is kicked after numpad enter is hit more than 3 times. As well as in between, is given a warning via side chat, so people in server can shame the person, as well as it should have the persons name. So: %PlayerName% has tried to enter third person, stop now or you will be kicked! %PlayerName% has tried to enter third person, last chance, stop now! %PlayerName% has tried to enter third person, for the last time, and will now be kicked! As well as the only reason why I want to do this is because if you run, and spam enter, you can slightly get into third person for a second. This is really not a problem, since my mission is vs AI, however if a player decided to spam it, they can slow down the server quite a bit since the script is being done every time they hit numpad enter. As well as there needs to be a grace for players in vehicles, so that they can still go into third person and not be kicked. But not spam it at the same time! Any info would be helpful as I don't know what I'm doing xD- 13 replies