Examples Updated
Exile Update 1.0.3
This commit is contained in:
parent
8273340e7c
commit
7b2407f462
@ -16,6 +16,29 @@ _position = [_data select 4, _data select 5, _data select 6];
|
||||
_vectorDirection = [_data select 7, _data select 8, _data select 9];
|
||||
_vectorUp = [_data select 10, _data select 11, _data select 12];
|
||||
_abandoned = _data select 18;
|
||||
try
|
||||
{
|
||||
if !((vectorMagnitude _vectorUp) isEqualTo 1) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
if ((_vectorUp select 0) > 0.95) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
if ((_vectorUp select 1) > 0.95) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
if ((_vectorUp select 2) isEqualTo 0) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
}
|
||||
catch
|
||||
{
|
||||
_vectorUp = [0, 0, 1];
|
||||
};
|
||||
_containerObject = [(_data select 1), _position, 0] call ExileServer_object_container_createContainer;
|
||||
_containerObject setVectorDirAndUp [_vectorDirection, _vectorUp];
|
||||
_containerObject setVariable ["ExileDatabaseID", _containerID];
|
||||
|
@ -91,7 +91,7 @@ if (_devFriendlyMode isEqualTo 1) then
|
||||
{
|
||||
if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith
|
||||
{
|
||||
if((name _requestingPlayer) isEqualTo (_x select 1))then
|
||||
if ((name _requestingPlayer) isEqualTo (_x select 1))then
|
||||
{
|
||||
_bambiPlayer setVariable ["ExileMoney", 500000, true];
|
||||
_bambiPlayer setVariable ["ExileScore", 100000];
|
||||
@ -124,9 +124,9 @@ else
|
||||
{
|
||||
_spawnType = 0;
|
||||
};
|
||||
if((canTriggerDynamicSimulation _player) isEqualTo false) then
|
||||
if((canTriggerDynamicSimulation _bambiPlayer) isEqualTo false) then
|
||||
{
|
||||
_player triggerDynamicSimulation true;
|
||||
_bambiPlayer triggerDynamicSimulation true;
|
||||
};
|
||||
_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}];
|
||||
_bambiPlayer call ExileServer_object_player_database_insert;
|
||||
|
@ -75,12 +75,12 @@ if (_devFriendlyMode isEqualTo 1) then
|
||||
{
|
||||
_devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs");
|
||||
{
|
||||
if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith
|
||||
if (_playerUID isEqualTo (_x select 0)) exitWith
|
||||
{
|
||||
if((name _requestingPlayer) isEqualTo (_x select 1))then
|
||||
if (_name isEqualTo (_x select 1)) then
|
||||
{
|
||||
_bambiPlayer setVariable ["ExileMoney", 500000, true];
|
||||
_bambiPlayer setVariable ["ExileScore", 100000];
|
||||
_player setVariable ["ExileMoney", 500000, true];
|
||||
_player setVariable ["ExileScore", 100000];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -9,9 +9,10 @@
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_victim","_killer","_countDeath","_countKill","_killSummary","_killingPlayer","_killType","_oldVictimRespect","_newVictimRespect","_oldKillerRespect","_newKillerRespect","_systemChat","_modifyVictimRespect","_respectLoss","_perks","_minRespectTransfer","_respectTransfer","_perkNames","_killerStatsNeedUpdate","_newKillerFrags","_victimStatsNeedUpdate","_newVictimDeaths","_victimPosition"];
|
||||
private["_victim", "_killer", "_instigator", "_countDeath", "_countKill", "_killSummary", "_killingPlayer", "_killType", "_oldVictimRespect", "_newVictimRespect", "_oldKillerRespect", "_newKillerRespect", "_unknownReasons", "_systemChat", "_modifyVictimRespect", "_respectLoss", "_perks", "_minRespectTransfer", "_respectTransfer", "_perkNames", "_killerStatsNeedUpdate", "_newKillerFrags", "_victimStatsNeedUpdate", "_newVictimDeaths", "_victimPosition"];
|
||||
_victim = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_instigator = _this select 2;
|
||||
if (!isServer || hasInterface || isNull _victim) exitWith {};
|
||||
_victim setVariable ["ExileDiedAt", time];
|
||||
if !(isPlayer _victim) exitWith {};
|
||||
@ -21,7 +22,7 @@ _countDeath = false;
|
||||
_countKill = false;
|
||||
_killSummary = [];
|
||||
_killingPlayer = _killer call ExileServer_util_getFragKiller;
|
||||
_killType = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragType;
|
||||
_killType = [_victim, _killer, _killingPlayer, _instigator] call ExileServer_util_getFragType;
|
||||
_oldVictimRespect = _victim getVariable ["ExileScore", 0];
|
||||
_newVictimRespect = _oldVictimRespect;
|
||||
_oldKillerRespect = 0;
|
||||
@ -34,8 +35,20 @@ switch (_killType) do
|
||||
{
|
||||
default
|
||||
{
|
||||
_unknownReasons =
|
||||
[
|
||||
"%1 died because... Arma.",
|
||||
"%1 died because the universe hates him.",
|
||||
"%1 died a mysterious death.",
|
||||
"%1 died and nobody knows why.",
|
||||
"%1 died because that's why.",
|
||||
"%1 died because %1 was very unlucky.",
|
||||
"%1 died due to Arma bugs and is probably very salty right now.",
|
||||
"%1 died an awkward death.",
|
||||
"%1 died. Yes, %1 is dead. Like really dead-dead."
|
||||
];
|
||||
_countDeath = true;
|
||||
_systemChat = format ["%1 died for an unknown reason!", name _victim];
|
||||
_systemChat = format [selectRandom _unknownReasons, name _victim];
|
||||
_newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "unlucky")));
|
||||
};
|
||||
case 1:
|
||||
|
@ -9,7 +9,7 @@
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_className","_position","_direction","_usePositionATL","_vehicleObject"];
|
||||
private["_className", "_position", "_direction", "_usePositionATL", "_vehicleObject"];
|
||||
_className = _this select 0;
|
||||
_position = _this select 1;
|
||||
_direction = _this select 2;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_className","_position","_direction","_usePositionATL","_pinCode","_vehicleObject"];
|
||||
private["_className", "_position", "_direction", "_usePositionATL", "_pinCode", "_vehicleObject"];
|
||||
_className = _this select 0;
|
||||
_position = _this select 1;
|
||||
_direction = _this select 2;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_vehicleID","_data","_position","_vectorDirection","_vectorUp","_pinCode","_texture","_vehicleObject","_lock","_unlockInSafeZonesAfterRestart","_isLocked","_hitpoints","_cargoContainers"];
|
||||
private["_vehicleID", "_data", "_position", "_vectorDirection", "_vectorUp", "_pinCode", "_texture", "_vehicleObject", "_lock", "_unlockInSafeZonesAfterRestart", "_isLocked", "_hitpoints", "_cargoContainers"];
|
||||
_vehicleID = _this;
|
||||
_data = format ["loadVehicle:%1", _vehicleID] call ExileServer_system_database_query_selectSingle;
|
||||
_position = [_data select 8, _data select 9, _data select 10];
|
||||
@ -17,6 +17,29 @@ _vectorDirection = [_data select 11, _data select 12, _data select 13];
|
||||
_vectorUp = [_data select 14, _data select 15, _data select 16];
|
||||
_pinCode = _data select 20;
|
||||
_texture = _data select 21;
|
||||
try
|
||||
{
|
||||
if !((vectorMagnitude _vectorUp) isEqualTo 1) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
if ((_vectorUp select 0) > 0.95) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
if ((_vectorUp select 1) > 0.95) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
if ((_vectorUp select 2) isEqualTo 0) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
}
|
||||
catch
|
||||
{
|
||||
_vectorUp = [0, 0, 1];
|
||||
};
|
||||
_vehicleObject = [(_data select 1), _position, [_vectorDirection, _vectorUp], true,_pinCode] call ExileServer_object_vehicle_createPersistentVehicle;
|
||||
_vehicleObject setVariable ["ExileDatabaseID", _vehicleID];
|
||||
_vehicleObject setVariable ["ExileOwnerUID", (_data select 3)];
|
||||
|
@ -9,7 +9,7 @@
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_key","_result","_pipe"];
|
||||
private["_key", "_result", "_pipe"];
|
||||
_key = _this;
|
||||
_result = "";
|
||||
while{true} do
|
||||
|
@ -9,7 +9,7 @@
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_flag","_currentTimestamp","_flagBuild","_maintenancePeriod","_maintenancePeriodDueDate"];
|
||||
private["_flag", "_currentTimestamp", "_flagBuild", "_maintenancePeriod", "_maintenancePeriodDueDate"];
|
||||
_flag = _this;
|
||||
_currentTimestamp = call ExileServer_util_time_currentTime;
|
||||
_flagBuild = _flag getVariable ["ExileTerritoryLastPayed", _currentTimestamp];
|
||||
|
Loading…
Reference in New Issue
Block a user