mirror of
https://github.com/Bjanski/ExAd.git
synced 2024-08-30 16:52:14 +00:00
fixed a weird error in master
This commit is contained in:
parent
14a31cb0fe
commit
c08f744167
29
mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp
Normal file
29
mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
CfgFunctions.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
class ExAd
|
||||
{
|
||||
tag = "ExAd";
|
||||
#include "Core\CfgFunctions.cpp"
|
||||
//#include "VirtualGarage\CfgFunctions.cpp"
|
||||
//#include "AdminEvents\CfgFunctions.cpp"
|
||||
//#include "Hacking\CfgFunctions.cpp"
|
||||
//#include "Grinding\CfgFunctions.cpp"
|
||||
//#include "HaloParachute\CfgFunctions.cpp"
|
||||
};
|
20
mpmissions/Exile.Altis/ExAdClient/CfgHints.cpp
Normal file
20
mpmissions/Exile.Altis/ExAdClient/CfgHints.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
CfgHints.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
//#include "VirtualGarage\CfgHints.cpp"
|
20
mpmissions/Exile.Altis/ExAdClient/CfgNetworkMessages.cpp
Normal file
20
mpmissions/Exile.Altis/ExAdClient/CfgNetworkMessages.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
CfgNetworkMessages.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
#include "Core\CfgNetworkMessages.cpp"
|
33
mpmissions/Exile.Altis/ExAdClient/Core/CfgFunctions.cpp
Normal file
33
mpmissions/Exile.Altis/ExAdClient/Core/CfgFunctions.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
CfgFunctions.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
class System
|
||||
{
|
||||
file = "ExAdClient\Core\Functions\System";
|
||||
class serverDispatch {};
|
||||
class incomingRequest {};
|
||||
class initOverlay {};
|
||||
class changeable {file = "ExAdClient\Core\postInit.sqf"; postInit = 1;};
|
||||
};
|
||||
class Utilities
|
||||
{
|
||||
file = "ExAdClient\Core\Functions\Utils";
|
||||
class advancedHint {};
|
||||
class call {};
|
||||
class getNearByLocalVeh {};
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
/*
|
||||
CfgNetworkMessages.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
class AdvancedHint
|
||||
{
|
||||
parameters[] = {"STRING","ARRAY"};
|
||||
};
|
||||
class Call
|
||||
{
|
||||
parameters[] = {"CODE"};
|
||||
};
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
fn_debugHandler.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
params ["_fnc","_exception"];
|
||||
|
||||
if(ExAd_Debug)then{
|
||||
diag_log format["ExAd Debugger: Error in %1 - '%2'",_fnc, _exception]
|
||||
}
|
@ -0,0 +1 @@
|
||||
/**
* fn_incomingRequest.sqf
* Modified by Jan Babor 2016
*
* Originally
* ExileClient_system_network_dispatchIncomingMessage
*
* Exile Mod
* www.exilemod.com
* © 2015 Exile Mod Team
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
*/
private["_payload","_messageName","_messageParameters","_allowedParameters","_message","_exception"];
_payload = _this;
try
{
if (isNil "_payload") then
{
throw "Message payload is not defined!";
};
if (typeName _payload != "ARRAY") then
{
throw "Message payload is not a array!";
};
if (count _payload != 2) then
{
throw format ["Wrong envelope field count! Payload: %1", _payload];
};
_messageName = _payload select 0;
_messageParameters = _payload select 1;
if !(isClass (missionConfigFile >> "CfgNetworkMessages" >> _messageName)) then
{
throw format ["Forbidden message name! Payload: %1", _payload];
};
_allowedParameters = getArray(missionConfigFile >> "CfgNetworkMessages" >> _messageName >> "parameters");
if (count _messageParameters != count _allowedParameters) then
{
throw format ["Parameter count mismatch! Payload: %1", _payload];
};
{
if (_x != typeName (_messageParameters select _forEachIndex)) then
{
throw format ["Parameter type mismatch! Payload: %1", _payload];
};
}
forEach _allowedParameters;
diag_log format["Dispatching message '%1'...", _messageName];
call compile format["_messageParameters call ExAd_fnc_%1;",_messageName];
}
catch
{
["incomingRequest",_exception] call ExAd_fnc_debugHandler;
};
true
|
@ -0,0 +1,21 @@
|
||||
/*
|
||||
fn_serverDispatch.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
_this remoteExec ["ExAdServer_fnc_clientRequest",2];
|
||||
|
||||
true
|
@ -0,0 +1 @@
|
||||
/**
* fn_advancedHint.sqf
* Modified by Jan Babor 2016
*
* Originally
* ExileClient_system_network_dispatchIncomingMessage
*
* Exile Mod
* www.exilemod.com
* © 2015 Exile Mod Team
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
*/
private ["_payload","_messageName","_messageParameters","_allowedParameters","_message","_exception"];
_payload = _this;
try
{
if(isNil "_payload")then{
throw "Message payload is not defined!"
};
if (typeName _payload != "ARRAY") then
{
throw "Message payload is not a array!";
};
if (count _payload != 2) then
{
throw format ["Wrong envelope field count! Payload: %1", _payload];
};
_messageName = _payload select 0;
_messageParameters = _payload select 1;
if !(isClass (missionConfigFile >> "CfgHints" >> "ExAd" >> _messageName)) then
{
throw format ["Forbidden Hint Class! Payload: %1", _payload];
};
_allowedParameters = getArray(missionConfigFile >> "CfgHints" >> "ExAd" >> _messageName >> "parameters");
if (count _messageParameters != count _allowedParameters) then
{
throw format ["Parameter count mismatch! Payload: %1", _payload];
};
{
if (_x != typeName (_messageParameters select _forEachIndex)) then
{
throw format ["Parameter type mismatch! Payload: %1", _payload];
};
}
forEach _allowedParameters;
missionNamespace setVariable [_messageName,_messageParameters];
[["ExAd",_messageName]] call BIS_fnc_advHint;
}
catch
{
["advancedHint",_exception] call ExAd_fnc_debugHandler;
};
true
|
@ -0,0 +1 @@
|
||||
/*
fn_call.sqf
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
params ["_code"];
call _code;
true
|
@ -0,0 +1 @@
|
||||
/*
fn_getNearByLocalVeh.sqf
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
private ["_obj","_cat","_nearDist","_list"];
_obj = [_this,0,objNull] call BIS_fnc_param;
_cat = [_this,1,["Car"],[[]]] call BIS_fnc_param;
_nearDist = [_this,2,100,[0]] call BIS_fnc_param;
_list = [];
{
if(local _x)then{
_list pushBack _x
}
}forEach nearestObjects [_obj,_cat,_nearDist];
_list
|
19
mpmissions/Exile.Altis/ExAdClient/Core/customize.sqf
Normal file
19
mpmissions/Exile.Altis/ExAdClient/Core/customize.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
customize.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
ExAd_Debug = true; //True/False If you want the ExAd code to generate debug logs.
|
20
mpmissions/Exile.Altis/ExAdClient/Core/postInit.sqf
Normal file
20
mpmissions/Exile.Altis/ExAdClient/Core/postInit.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
postInit.sqf
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
execVM "ExAdClient\Core\customize.sqf";
|
25
mpmissions/Exile.Altis/ExAdClient/ExAd.cpp
Normal file
25
mpmissions/Exile.Altis/ExAdClient/ExAd.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
ExAd.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
//#include "Core\ExAd.cpp"
|
||||
//#include "VirtualGarage\ExAd.cpp"
|
||||
//#include "AdminEvents\ExAd.cpp"
|
||||
//#include "Hacking\ExAd.cpp"
|
||||
//#include "Grinding\ExAd.cpp"
|
||||
//#include "HaloParachute\ExAd.cpp"
|
20
mpmissions/Exile.Altis/ExAdClient/RscTitles.cpp
Normal file
20
mpmissions/Exile.Altis/ExAdClient/RscTitles.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
RscTitles.cpp
|
||||
|
||||
Copyright 2016 Jan Babor
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
//#include "HUD\RscTitles.cpp"
|
38
mpmissions/Exile.Altis/description.ext
Normal file
38
mpmissions/Exile.Altis/description.ext
Normal file
@ -0,0 +1,38 @@
|
||||
#include "ExAdClient\ExAd.cpp"
|
||||
|
||||
class CfgFunctions
|
||||
{
|
||||
#include "ExAdClient\CfgFunctions.cpp"
|
||||
};
|
||||
|
||||
class RscTitles
|
||||
{
|
||||
#include "ExAdClient\RscTitles.cpp"
|
||||
};
|
||||
|
||||
class CfgHints
|
||||
{
|
||||
#include "ExAdClient\CfgHints.cpp"
|
||||
};
|
||||
|
||||
class CfgNetworkMessages
|
||||
{
|
||||
#include "ExAdClient\CfgNetworkMessages.cpp"
|
||||
};
|
||||
|
||||
class CfgRemoteExec
|
||||
{
|
||||
class Functions
|
||||
{
|
||||
mode = 1;
|
||||
jip = 0;
|
||||
|
||||
class ExileServer_system_network_dispatchIncomingMessage { allowedTargets=2; };
|
||||
class ExAd_fnc_clientRequest { allowedTargets=2; };
|
||||
};
|
||||
class Commands
|
||||
{
|
||||
mode=0;
|
||||
jip=0;
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user