tk
This commit is contained in:
parent
f988593037
commit
7ab166465e
3 changed files with 81 additions and 0 deletions
1
tk/$PBOPREFIX$
Normal file
1
tk/$PBOPREFIX$
Normal file
|
|
@ -0,0 +1 @@
|
|||
hijack_server\tk
|
||||
42
tk/config.cpp
Normal file
42
tk/config.cpp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
class CfgPatches
|
||||
{
|
||||
class hijack_server_tk
|
||||
{
|
||||
name = "Hijack Server 1pp Addon";
|
||||
author = "jack77213";
|
||||
url = "https://hijack.moe";
|
||||
|
||||
requiredVersion = 1.72;
|
||||
requiredAddons[] = {"A3_Functions_F"};
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions
|
||||
{
|
||||
class hijack
|
||||
{
|
||||
class server
|
||||
{
|
||||
class tk
|
||||
{
|
||||
file="\hijack_server\tk\fn_tk.sqf";
|
||||
postInit=1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgDebriefing
|
||||
{
|
||||
class End4
|
||||
{
|
||||
title = "Teamkill!";
|
||||
subtitle = "subtitle";
|
||||
description = "Teamkill is not Allowed.";
|
||||
pictureBackground = "";
|
||||
picture = "b_inf";
|
||||
pictureColor[] = {0.0,0.3,0.6,1};
|
||||
};
|
||||
};
|
||||
38
tk/fn_tk.sqf
Normal file
38
tk/fn_tk.sqf
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
if (!isServer) exitWith {};
|
||||
|
||||
hijack_tk_client = {
|
||||
[] spawn {
|
||||
waitUntil { alive player };
|
||||
HIJACK_TKS = 0;
|
||||
/*
|
||||
player addEventHandler ["HandleDamage", {
|
||||
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
|
||||
if (isPlayer _instigator) then {
|
||||
if (_instigator == _unit) then {
|
||||
remoteExecCall ["hijack_tk_client_kick", _instigator];
|
||||
};
|
||||
};
|
||||
}];
|
||||
*/
|
||||
player addEventHandler ["Killed", {
|
||||
params ["_unit", "_killer", "_instigator", "_useEffects"];
|
||||
if (isPlayer _instigator) then {
|
||||
if (_instigator != _unit) then {
|
||||
remoteExecCall ["hijack_tk_client_kick", _instigator];
|
||||
};
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
hijack_tk_client_kick = {
|
||||
if (HIJACK_TKS < 2) then {
|
||||
HIJACK_TKS = HIJACK_TKS + 1;
|
||||
} else {
|
||||
["End4", false, 2] call BIS_fnc_endMission;
|
||||
};
|
||||
};
|
||||
|
||||
publicVariable "hijack_tk_client_kick";
|
||||
publicVariable "hijack_tk_client";
|
||||
remoteExecCall ["hijack_tk_client", -2, true];
|
||||
Loading…
Add table
Add a link
Reference in a new issue