WGC GeekGarage Posted March 1, 2014 Report Share Posted March 1, 2014 So we had a few issues with players doing kamikaze into other players bases and we got fed up with it since it made players leave our servers. So i came up with a really simple solution to it. It works by setting triggers at plot poles with a radius of 50 meters and a height test of min 3 meters and max 65 meters from the ground and speeds above 130. you can tweak this to what you like. I'm not saying this is the best way to do this but it works fine on our server So it will TP Air vehicles away from the base it's trying to crash into, based on the parameters you set (minimum height and maximum height from ground and air vehicle speed. Just so all are aware, this is no longer in use as the triggers are created on all clients and should be server side only! It is kept only for reference purpose and should not be used as posted below! If you still want to use it, instead of "in your init.sqf inside the "if (!isDedicated) then {" scope, add this:" Then do "in your init.sqf inside the "if (isServer) then {" scope, add this:" but i have NOT tested it Installation: Create a file called "AntiKamikaze.sqf" in your scripts folder in the root of your mission file. and then insert this: diag_log "Loading Anti Kamikaze..."; _centerOfMap = [7200,7200,0]; _triggerRadius = 50; _AKplotPole = nearestObjects [_centerOfMap, ["Plastic_Pole_EP1_DZ"], 14500]; AK_fnc_GG = { if ((vehicle player) isKindOf "Air") then { _v = vehicle player; _speed = speed _v; _coordsVeh = getPos _v; _altitude = _coordsVeh select 2; if (_altitude > 3.0 && _altitude < 65.0 && _speed >= 130) then { //This is where you define the trigger altitude and speed _newPos = [_coordsVeh, 150, 300, 10, 0, 20, 0] call BIS_fnc_findSafePos; _newPos set [2, 400]; _v setpos _newPos; titleText ["Really!?...what are you... like 4 years old??? Don't kamikaze! (If you try to land fly slower!)", "PLAIN", 3]; }; }; }; { _trg=createTrigger["EmptyDetector",getPos _x]; _trg setTriggerArea[_triggerRadius, _triggerRadius, 0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trg setTriggerStatements["(vehicle player) in thisList", "call AK_fnc_GG", ""]; _trg setTriggerType "SWITCH"; diag_log format["GEEKTEST: Creating Trigger @ %1",getPos _x]; } forEach _AKplotPole; diag_log "...Anti Kamikaze Loaded!"; Remember to change center of the map coords if you don't use chenarus map in your init.sqf inside the "if (!isDedicated) then {" scope, add this: //Anti Kamikaze [] execVM "Scripts\AntiKamikaze.sqf" Please do comment if you know a better way to do it, or if you know of a way to make a sphere around each plot pole instead of a cylinder, just so i can get rid of the height check. Please like if you use it :) Rythron and raziel23x 2 Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 2, 2014 Author Report Share Posted March 2, 2014 Thx, and it sorted all our kamikaze players, so i'm really satisfied :) and if you have an idea, please try and expand and share. I will update soon with an easier way to set vars for non coding admins Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted March 2, 2014 Report Share Posted March 2, 2014 What does it do? Link to comment Share on other sites More sharing options...
Friendly Posted March 2, 2014 Report Share Posted March 2, 2014 would this make it hard for airplanes to land at airfields? Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 2, 2014 Author Report Share Posted March 2, 2014 What does it do? it will TP Air vehicles away from the base it's trying to crash into, based on the parameters you set (updated original post so it also state this) Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 2, 2014 Author Report Share Posted March 2, 2014 would this make it hard for airplanes to land at airfields? very hard if you keep the setting as they are right now. Link to comment Share on other sites More sharing options...
MGT Posted March 2, 2014 Report Share Posted March 2, 2014 Why not remove planes from dynamic spawns and increase the price at traders if you have kamikaze issues on your server? It must mean that your players have too much money or they're too cheap? williamjbrown 1 Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 2, 2014 Author Report Share Posted March 2, 2014 the root issue is that we allow base raids, and then some players just don't care how much it costs, they just want to get back at those they think raided them, and then they kamikaze into the players base that they think raided them (some clans on our server like to raid the same players over and over). And i don't see that raiding a players base is a problem as we have rules implemented and enforced about what is allowed when you raid a base. but some victims still get so angry that they do this kind of stupidity. Link to comment Share on other sites More sharing options...
Coffee Posted March 9, 2014 Report Share Posted March 9, 2014 would this make it hard for airplanes to land at airfields? Unless there is a plot pole on the air field i would say no since it uses a plot pole to activate it by the looks of it Link to comment Share on other sites More sharing options...
redcloud78 Posted March 10, 2014 Report Share Posted March 10, 2014 How would you just tp the player who is walking and finds the base away and knock him/her out as a warning with a text warning? Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 10, 2014 Author Report Share Posted March 10, 2014 waituntil {!isnull (finddisplay 46)}; diag_log "Loading Anti Kamikaze..."; _centerOfMap = [7100,7750,0]; _triggerRadiusPlot = 50; _AKplotPole = nearestObjects [_centerOfMap, ["Plastic_Pole_EP1_DZ"], 10500]; AK_fnc_GG = { if ((vehicle player) isKindOf "Man") then { _v = vehicle player; _coordsVeh = getPos _v; _newPos = [_coordsVeh, 150, 300, 10, 0, 20, 0] call BIS_fnc_findSafePos; _v setpos _newPos; titleText ["PUT YOUR TEXT HERE", "PLAIN", 3]; }; }; }; { _trg=createTrigger["EmptyDetector",getPos _x]; _trg setTriggerArea[_triggerRadiusPlot , _triggerRadiusPlot , 0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trg setTriggerStatements["(vehicle player) in thisList", "call AK_fnc_GG", ""]; _trg setTriggerType "SWITCH"; } forEach _AKplotPole; diag_log "...Anti Kamikaze Loaded!"; just remember this will not knockout your target but you can just add knocout code to the function if you want it. also remember it will do this to every plot pole on the server (Code above is untested but should work) redcloud78 1 Link to comment Share on other sites More sharing options...
Sandbird Posted March 13, 2014 Report Share Posted March 13, 2014 For some weird reason its not working. The code seems right, and the script is loading....but i am not getting TPd when i try to crash a chopper right on top of the pole, with > 130 speed. I just crash....I have Godmode on but i dont think that matters. Plot pole is at coordinates: [54.554,[3268,8807.62,0.064]] so its not that its off the map or anything. Really weird. Link to comment Share on other sites More sharing options...
WAE Posted March 14, 2014 Report Share Posted March 14, 2014 Awesome script + idea. Just looking at this, wouldn't people just be able to get to a speed of say 50 or something which is underneath the variable and kamikaze still. If you set the variable too low, the landing thing wouldn't work, because it'd be impossible to land near a base. This is because if you put the variable at 50, you'd find it hard to land because you'd be stalling out if you were going under 50 depending on what type of angle you were trying to land at. If you set the variable too high, you'd have people going under the set speed to kamikaze. That's the only "kink" I've found in it, but overall, great script. I haven't actually tested this out yet, so if I am wrong, please don't kill me :P Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 14, 2014 Author Report Share Posted March 14, 2014 well you are correct, but most players who are kamikazing don't really think and tend to fly as fast as they can since that will destroy more in their mindset. so yes if you go slower than the script defines then it's not kamikaze in script terms. but agin the script was build based on the mindset of a "kamikazer" Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 14, 2014 Author Report Share Posted March 14, 2014 For some weird reason its not working. The code seems right, and the script is loading....but i am not getting TPd when i try to crash a chopper right on top of the pole, with > 130 speed. I just crash....I have Godmode on but i dont think that matters. Plot pole is at coordinates: [54.554,[3268,8807.62,0.064]] so its not that its off the map or anything. Really weird. What map?? Link to comment Share on other sites More sharing options...
Sandbird Posted March 14, 2014 Report Share Posted March 14, 2014 Chernarus, epoch 1.0.4.2 Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 14, 2014 Author Report Share Posted March 14, 2014 diag_log "Loading Anti Kamikaze..."; _centerOfMap = [7200,7200,0]; _AKplotPole = nearestObjects [_centerOfMap, ["Plastic_Pole_EP1_DZ"], 14500]; AK_fnc_GG = { if ((vehicle player) isKindOf "Air") then { _v = vehicle player; _speed = speed _v; _coordsVeh = getPos _v; _altitude = _coordsVeh select 2; if (_altitude > 3.0 && _altitude < 65.0 && _speed >= 130) then { _newPos = [_coordsVeh, 150, 300, 10, 0, 20, 0] call BIS_fnc_findSafePos; _newPos set [2, 400]; _v setpos _newPos; titleText ["Really!?...what are you... like 4 years old??? Don't kamikaze! (If you try to land fly slower!)", "PLAIN", 3]; }; }; }; { _trg=createTrigger["EmptyDetector",getPos _x]; _trg setTriggerArea[50, 50, 0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trg setTriggerStatements["(vehicle player) in thisList", "call AK_fnc_GG", ""]; _trg setTriggerType "SWITCH"; diag_log format["GEEKTEST: Creating Trigger @ %1",getPos _x]; } forEach _AKplotPole; diag_log "...Anti Kamikaze Loaded!"; Update your server with this one and send me the IP if it still isn't working and i will have a look in the client log Link to comment Share on other sites More sharing options...
Sandbird Posted March 14, 2014 Report Share Posted March 14, 2014 This is the the same code as the 1st post :) Its the same with the one i am using. The client log only shows the diag_log "...Anti Kamikaze Loaded!"; No errors, no nothing. Its ok, i can debug stuff on my own, thanks for the help. Its just that it looks fine..i dont get it why its not working. I'll disable the anti-hack and see, and add some more diag_logs :) Link to comment Share on other sites More sharing options...
LimpDisc Posted March 14, 2014 Report Share Posted March 14, 2014 Does this log anything when someone attempts a kamikaze, but ends up being TP'd away? If not, could some tye of log be added? Link to comment Share on other sites More sharing options...
Sandbird Posted March 14, 2014 Report Share Posted March 14, 2014 Does this log anything when someone attempts a kamikaze, but ends up being TP'd away? If not, could some tye of log be added? Right after the titleText ["Really..... try adding this: _player = player getVariable["bodyName", name player]; diag_log format["#### Kamikaze attempt #### Player: %1 tried to do kamikaze at: %2",_player,_coordsVeh]; Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 15, 2014 Author Report Share Posted March 15, 2014 This is the the same code as the 1st post :) Its the same with the one i am using. The client log only shows the diag_log "...Anti Kamikaze Loaded!"; No errors, no nothing. Its ok, i can debug stuff on my own, thanks for the help. Its just that it looks fine..i dont get it why its not working. I'll disable the anti-hack and see, and add some more diag_logs :) It's the same since I just updated the OP ;) Try and check your client log and search for GEEKTEST there should be a text called Created Trigger @ coords here if it's not there then it does not detect any plot poles Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 15, 2014 Author Report Share Posted March 15, 2014 Right after the titleText ["Really..... try adding this: _player = player getVariable["bodyName", name player]; diag_log format["#### Kamikaze attempt #### Player: %1 tried to do kamikaze at: %2",_player,_coordsVeh]; Would not help as the script runs client side, need to create a public event handler to log to the server RPT i will post mine if i get time, else search the forum, i saw one post it a few weeks back i think Link to comment Share on other sites More sharing options...
WAE Posted March 15, 2014 Report Share Posted March 15, 2014 well you are correct, but most players who are kamikazing don't really think and tend to fly as fast as they can since that will destroy more in their mindset. so yes if you go slower than the script defines then it's not kamikaze in script terms. but agin the script was build based on the mindset of a "kamikazer" Good point. Never the less, a great script! Link to comment Share on other sites More sharing options...
antartis Posted March 15, 2014 Report Share Posted March 15, 2014 in my own opinion this will not stop kamikaze at all. I use to have something like this and is just a "layer" of protection to n00bs kamikaze players. People who really do kamikaze will eject right before they enter the trigger and it will NOT stop the empty vehicle going full speed to impact & destroy whatever ur protecting. tested. Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted March 15, 2014 Author Report Share Posted March 15, 2014 Delenda on how you adjust the tigger area. But you are correct that's it won't detect emptor vehicles. I'looking into A Way to dó it with tiggers but haven't been lucky. But it have stopped alot of kamikaze on our servers. This is also tested Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now