Updated this so it follows the License by arma

This commit is contained in:
Cloudhax23 2017-02-23 07:11:54 -06:00
parent cbd037595f
commit 00cffcf671
266 changed files with 17533 additions and 0 deletions

View File

@ -0,0 +1,7 @@
The only thing that changed in this is the exile_server.pbo and the exile.ini. You can A) If you havent TOUCHED EITHER just copy and replace the file B) Merge them, but be wary somethings in extDB2 are not in extDB3
You can literally just drop in your exile_server_config.pbo in here and replace the current one and it will work
YOU WILL HAVE TO MODIFY exile_server.pbo if you have made custom changes like me (this pbo is vanilla exile_server.pbo with ONLY changes from extdb2 to extdb3)
Both the config.cfg and basic.cfg are unchanged.
Pretty much this is a drop in replace for extdb3. Make sure you keep updated on Torndeco's downloads at https://bitbucket.org/torndeco/extdb3/downloads/
If Torndeco updates extdb3 (which he does :D a lot) simply over write the current .so files for linux or the dlls for windows.
OH AND LASTLY I did not update the names of the files in the exile_server.pbo. if you want to thats fine but change that fn_preinit as needed. Again this is not at all necessary.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
exile_server

View File

@ -0,0 +1,15 @@
/**
* Post-Initialization
*
* 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/.
*/
call ExileServer_system_process_postInit;
true

View File

@ -0,0 +1,280 @@
/**
* Pre-Initialization
*
* 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 ['_code', '_function', '_file'];
{
_code = '';
_function = _x select 0;
_file = _x select 1;
if (isText (missionConfigFile >> 'CfgExileCustomCode' >> _function)) then
{
_file = getText (missionConfigFile >> 'CfgExileCustomCode' >> _function);
};
_code = compileFinal (preprocessFileLineNumbers _file);
missionNamespace setVariable [_function, _code];
}
forEach
[
['ExileServer_object_bush_network_chopBushRequest', 'exile_server\code\ExileServer_object_bush_network_chopBushRequest.sqf'],
['ExileServer_object_concreteMixer_mixingProcess', 'exile_server\code\ExileServer_object_concreteMixer_mixingProcess.sqf'],
['ExileServer_object_concreteMixer_network_concreteMixerStartRequest', 'exile_server\code\ExileServer_object_concreteMixer_network_concreteMixerStartRequest.sqf'],
['ExileServer_object_construction_database_delete', 'exile_server\code\ExileServer_object_construction_database_delete.sqf'],
['ExileServer_object_construction_database_insert', 'exile_server\code\ExileServer_object_construction_database_insert.sqf'],
['ExileServer_object_construction_database_load', 'exile_server\code\ExileServer_object_construction_database_load.sqf'],
['ExileServer_object_construction_database_lockUpdate', 'exile_server\code\ExileServer_object_construction_database_lockUpdate.sqf'],
['ExileServer_object_construction_event_onMpKilled', 'exile_server\code\ExileServer_object_construction_event_onMpKilled.sqf'],
['ExileServer_object_construction_network_addLockRequest', 'exile_server\code\ExileServer_object_construction_network_addLockRequest.sqf'],
['ExileServer_object_construction_network_buildConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_buildConstructionRequest.sqf'],
['ExileServer_object_construction_network_buildTerritoryRequest', 'exile_server\code\ExileServer_object_construction_network_buildTerritoryRequest.sqf'],
['ExileServer_object_construction_network_deconstructConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_deconstructConstructionRequest.sqf'],
['ExileServer_object_construction_network_moveConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_moveConstructionRequest.sqf'],
['ExileServer_object_construction_network_repairConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_repairConstructionRequest.sqf'],
['ExileServer_object_construction_network_swapConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_swapConstructionRequest.sqf'],
['ExileServer_object_construction_network_upgradeConstructionRequest', 'exile_server\code\ExileServer_object_construction_network_upgradeConstructionRequest.sqf'],
['ExileServer_object_container_createContainer', 'exile_server\code\ExileServer_object_container_createContainer.sqf'],
['ExileServer_object_container_packContainer', 'exile_server\code\ExileServer_object_container_packContainer.sqf'],
['ExileServer_object_container_database_delete', 'exile_server\code\ExileServer_object_container_database_delete.sqf'],
['ExileServer_object_container_database_insert', 'exile_server\code\ExileServer_object_container_database_insert.sqf'],
['ExileServer_object_container_database_load', 'exile_server\code\ExileServer_object_container_database_load.sqf'],
['ExileServer_object_container_database_setPin', 'exile_server\code\ExileServer_object_container_database_setPin.sqf'],
['ExileServer_object_container_database_update', 'exile_server\code\ExileServer_object_container_database_update.sqf'],
['ExileServer_object_container_event_onMpKilled', 'exile_server\code\ExileServer_object_container_event_onMpKilled.sqf'],
['ExileServer_object_container_network_packRequest', 'exile_server\code\ExileServer_object_container_network_packRequest.sqf'],
['ExileServer_object_flies_spawn', 'exile_server\code\ExileServer_object_flies_spawn.sqf'],
['ExileServer_object_floodLight_network_toggleFloodLightRequest', 'exile_server\code\ExileServer_object_floodLight_network_toggleFloodLightRequest.sqf'],
['ExileServer_object_handcuffs_network_breakFreeRequest', 'exile_server\code\ExileServer_object_handcuffs_network_breakFreeRequest.sqf'],
['ExileServer_object_handcuffs_network_freeRequest', 'exile_server\code\ExileServer_object_handcuffs_network_freeRequest.sqf'],
['ExileServer_object_handcuffs_network_handcuffRequest', 'exile_server\code\ExileServer_object_handcuffs_network_handcuffRequest.sqf'],
['ExileServer_object_lock_network_hotwireLockRequest', 'exile_server\code\ExileServer_object_lock_network_hotwireLockRequest.sqf'],
['ExileServer_object_lock_network_lockToggle', 'exile_server\code\ExileServer_object_lock_network_lockToggle.sqf'],
['ExileServer_object_lock_network_scanCodeLockRequest', 'exile_server\code\ExileServer_object_lock_network_scanCodeLockRequest.sqf'],
['ExileServer_object_lock_network_setPin', 'exile_server\code\ExileServer_object_lock_network_setPin.sqf'],
['ExileServer_object_player_createBambi', 'exile_server\code\ExileServer_object_player_createBambi.sqf'],
['ExileServer_object_player_sendStatsUpdate', 'exile_server\code\ExileServer_object_player_sendStatsUpdate.sqf'],
['ExileServer_object_player_database_insert', 'exile_server\code\ExileServer_object_player_database_insert.sqf'],
['ExileServer_object_player_database_load', 'exile_server\code\ExileServer_object_player_database_load.sqf'],
['ExileServer_object_player_database_update', 'exile_server\code\ExileServer_object_player_database_update.sqf'],
['ExileServer_object_player_event_onMpKilled', 'exile_server\code\ExileServer_object_player_event_onMpKilled.sqf'],
['ExileServer_object_player_network_beginTakeAllRequest', 'exile_server\code\ExileServer_object_player_network_beginTakeAllRequest.sqf'],
['ExileServer_object_player_network_connectionTest', 'exile_server\code\ExileServer_object_player_network_connectionTest.sqf'],
['ExileServer_object_player_network_createPlayerRequest', 'exile_server\code\ExileServer_object_player_network_createPlayerRequest.sqf'],
['ExileServer_object_player_network_endBambiStateRequest', 'exile_server\code\ExileServer_object_player_network_endBambiStateRequest.sqf'],
['ExileServer_object_player_network_endTakeAllRequest', 'exile_server\code\ExileServer_object_player_network_endTakeAllRequest.sqf'],
['ExileServer_object_player_network_hasPlayerRequest', 'exile_server\code\ExileServer_object_player_network_hasPlayerRequest.sqf'],
['ExileServer_object_player_network_hideBodyRequest', 'exile_server\code\ExileServer_object_player_network_hideBodyRequest.sqf'],
['ExileServer_object_player_network_loadPlayerRequest', 'exile_server\code\ExileServer_object_player_network_loadPlayerRequest.sqf'],
['ExileServer_object_player_network_resetPlayerRequest', 'exile_server\code\ExileServer_object_player_network_resetPlayerRequest.sqf'],
['ExileServer_object_player_network_savePlayerRequest', 'exile_server\code\ExileServer_object_player_network_savePlayerRequest.sqf'],
['ExileServer_object_player_network_setPlayerMoneyRequest', 'exile_server\code\ExileServer_object_player_network_setPlayerMoneyRequest.sqf'],
['ExileServer_object_player_network_switchMoveRequest', 'exile_server\code\ExileServer_object_player_network_switchMoveRequest.sqf'],
['ExileServer_object_player_network_updatePlayerIncapacitatedRequest', 'exile_server\code\ExileServer_object_player_network_updatePlayerIncapacitatedRequest.sqf'],
['ExileServer_object_shippingContainer_network_smashShippingContainerRequest', 'exile_server\code\ExileServer_object_shippingContainer_network_smashShippingContainerRequest.sqf'],
['ExileServer_object_supplyBox_network_attachSupplyBoxRequest', 'exile_server\code\ExileServer_object_supplyBox_network_attachSupplyBoxRequest.sqf'],
['ExileServer_object_supplyBox_network_detachSupplyBoxRequest', 'exile_server\code\ExileServer_object_supplyBox_network_detachSupplyBoxRequest.sqf'],
['ExileServer_object_supplyBox_network_installSupplyBoxRequest', 'exile_server\code\ExileServer_object_supplyBox_network_installSupplyBoxRequest.sqf'],
['ExileServer_object_tree_network_chopTreeRequest', 'exile_server\code\ExileServer_object_tree_network_chopTreeRequest.sqf'],
['ExileServer_object_vehicle_carefulCreateVehicle', 'exile_server\code\ExileServer_object_vehicle_carefulCreateVehicle.sqf'],
['ExileServer_object_vehicle_createNonPersistentVehicle', 'exile_server\code\ExileServer_object_vehicle_createNonPersistentVehicle.sqf'],
['ExileServer_object_vehicle_createPersistentVehicle', 'exile_server\code\ExileServer_object_vehicle_createPersistentVehicle.sqf'],
['ExileServer_object_vehicle_remove', 'exile_server\code\ExileServer_object_vehicle_remove.sqf'],
['ExileServer_object_vehicle_database_delete', 'exile_server\code\ExileServer_object_vehicle_database_delete.sqf'],
['ExileServer_object_vehicle_database_insert', 'exile_server\code\ExileServer_object_vehicle_database_insert.sqf'],
['ExileServer_object_vehicle_database_load', 'exile_server\code\ExileServer_object_vehicle_database_load.sqf'],
['ExileServer_object_vehicle_database_resetCode', 'exile_server\code\ExileServer_object_vehicle_database_resetCode.sqf'],
['ExileServer_object_vehicle_database_update', 'exile_server\code\ExileServer_object_vehicle_database_update.sqf'],
['ExileServer_object_vehicle_event_onDamaged', 'exile_server\code\ExileServer_object_vehicle_event_onDamaged.sqf'],
['ExileServer_object_vehicle_event_onGetIn', 'exile_server\code\ExileServer_object_vehicle_event_onGetIn.sqf'],
['ExileServer_object_vehicle_event_onGetOut', 'exile_server\code\ExileServer_object_vehicle_event_onGetOut.sqf'],
['ExileServer_object_vehicle_event_onMPKilled', 'exile_server\code\ExileServer_object_vehicle_event_onMPKilled.sqf'],
['ExileServer_object_vehicle_network_flipVehRequest', 'exile_server\code\ExileServer_object_vehicle_network_flipVehRequest.sqf'],
['ExileServer_object_vehicle_network_lockVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_lockVehicleRequest.sqf'],
['ExileServer_object_vehicle_network_pushVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_pushVehicleRequest.sqf'],
['ExileServer_object_vehicle_network_rekeyVehicleDialogRequest', 'exile_server\code\ExileServer_object_vehicle_network_rekeyVehicleDialogRequest.sqf'],
['ExileServer_object_vehicle_network_rekeyVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_rekeyVehicleRequest.sqf'],
['ExileServer_object_vehicle_network_resetCodeDialogRequest', 'exile_server\code\ExileServer_object_vehicle_network_resetCodeDialogRequest.sqf'],
['ExileServer_object_vehicle_network_resetCodeRequest', 'exile_server\code\ExileServer_object_vehicle_network_resetCodeRequest.sqf'],
['ExileServer_object_vehicle_network_rotateVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_rotateVehicleRequest.sqf'],
['ExileServer_object_vehicle_network_setFuelRequest', 'exile_server\code\ExileServer_object_vehicle_network_setFuelRequest.sqf'],
['ExileServer_object_vehicle_network_unlockVehicleRequest', 'exile_server\code\ExileServer_object_vehicle_network_unlockVehicleRequest.sqf'],
['ExileServer_system_breaching_network_breachingCancel', 'exile_server\code\ExileServer_system_breaching_network_breachingCancel.sqf'],
['ExileServer_system_breaching_network_breachingPlaceRequest', 'exile_server\code\ExileServer_system_breaching_network_breachingPlaceRequest.sqf'],
['ExileServer_system_breaching_network_breachingStart', 'exile_server\code\ExileServer_system_breaching_network_breachingStart.sqf'],
['ExileServer_system_breaching_network_chargePlanted', 'exile_server\code\ExileServer_system_breaching_network_chargePlanted.sqf'],
['ExileServer_system_breaching_network_detonateAllCharges', 'exile_server\code\ExileServer_system_breaching_network_detonateAllCharges.sqf'],
['ExileServer_system_clan_updateClients', 'exile_server\code\ExileServer_system_clan_updateClients.sqf'],
['ExileServer_system_clan_updateMarkers', 'exile_server\code\ExileServer_system_clan_updateMarkers.sqf'],
['ExileServer_system_clan_updatePolys', 'exile_server\code\ExileServer_system_clan_updatePolys.sqf'],
['ExileServer_system_clan_database_load', 'exile_server\code\ExileServer_system_clan_database_load.sqf'],
['ExileServer_system_clan_network_addMarkerRequest', 'exile_server\code\ExileServer_system_clan_network_addMarkerRequest.sqf'],
['ExileServer_system_clan_network_addPolyRequest', 'exile_server\code\ExileServer_system_clan_network_addPolyRequest.sqf'],
['ExileServer_system_clan_network_inviteToClanRequest', 'exile_server\code\ExileServer_system_clan_network_inviteToClanRequest.sqf'],
['ExileServer_system_clan_network_inviteToClanRequestClientResponse', 'exile_server\code\ExileServer_system_clan_network_inviteToClanRequestClientResponse.sqf'],
['ExileServer_system_clan_network_kickClanPlayerRequest', 'exile_server\code\ExileServer_system_clan_network_kickClanPlayerRequest.sqf'],
['ExileServer_system_clan_network_leaveClanRequest', 'exile_server\code\ExileServer_system_clan_network_leaveClanRequest.sqf'],
['ExileServer_system_clan_network_registerClanRequest', 'exile_server\code\ExileServer_system_clan_network_registerClanRequest.sqf'],
['ExileServer_system_clan_network_removeMarkerRequest', 'exile_server\code\ExileServer_system_clan_network_removeMarkerRequest.sqf'],
['ExileServer_system_database_connect', 'exile_server\code\ExileServer_system_database_connect.sqf'],
['ExileServer_system_database_handleBig', 'exile_server\code\ExileServer_system_database_handleBig.sqf'],
['ExileServer_system_database_query_fireAndForget', 'exile_server\code\ExileServer_system_database_query_fireAndForget.sqf'],
['ExileServer_system_database_query_insertSingle', 'exile_server\code\ExileServer_system_database_query_insertSingle.sqf'],
['ExileServer_system_database_query_selectFull', 'exile_server\code\ExileServer_system_database_query_selectFull.sqf'],
['ExileServer_system_database_query_selectSingle', 'exile_server\code\ExileServer_system_database_query_selectSingle.sqf'],
['ExileServer_system_database_query_selectSingleField', 'exile_server\code\ExileServer_system_database_query_selectSingleField.sqf'],
['ExileServer_system_event_initialize', 'exile_server\code\ExileServer_system_event_initialize.sqf'],
['ExileServer_system_event_abandonedSafe_start', 'exile_server\code\ExileServer_system_event_abandonedSafe_start.sqf'],
['ExileServer_system_event_ambientFlyOver_start', 'exile_server\code\ExileServer_system_event_ambientFlyOver_start.sqf'],
['ExileServer_system_event_earthQuake_start', 'exile_server\code\ExileServer_system_event_earthQuake_start.sqf'],
['ExileServer_system_event_supplyBox_start', 'exile_server\code\ExileServer_system_event_supplyBox_start.sqf'],
['ExileServer_system_event_thread_spawn', 'exile_server\code\ExileServer_system_event_thread_spawn.sqf'],
['ExileServer_system_garbageCollector_cleanDatabase', 'exile_server\code\ExileServer_system_garbageCollector_cleanDatabase.sqf'],
['ExileServer_system_garbageCollector_deleteObject', 'exile_server\code\ExileServer_system_garbageCollector_deleteObject.sqf'],
['ExileServer_system_garbageCollector_start', 'exile_server\code\ExileServer_system_garbageCollector_start.sqf'],
['ExileServer_system_garbageCollector_unscheduled_deleteAllDead', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteAllDead.sqf'],
['ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteGroundWeaponHolders.sqf'],
['ExileServer_system_garbageCollector_unscheduled_deleteGroups', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteGroups.sqf'],
['ExileServer_system_garbageCollector_unscheduled_deleteLoot', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteLoot.sqf'],
['ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated', 'exile_server\code\ExileServer_system_garbageCollector_unscheduled_deleteWeaponHolderSimulated.sqf'],
['ExileServer_system_locker_network_lockerDepositRequest', 'exile_server\code\ExileServer_system_locker_network_lockerDepositRequest.sqf'],
['ExileServer_system_locker_network_lockerWithdrawRequest', 'exile_server\code\ExileServer_system_locker_network_lockerWithdrawRequest.sqf'],
['ExileServer_system_lootManager_dropItem', 'exile_server\code\ExileServer_system_lootManager_dropItem.sqf'],
['ExileServer_system_lootManager_initialize', 'exile_server\code\ExileServer_system_lootManager_initialize.sqf'],
['ExileServer_system_lootManager_spawnLootInBuilding', 'exile_server\code\ExileServer_system_lootManager_spawnLootInBuilding.sqf'],
['ExileServer_system_lootManager_network_spawnLootRequest', 'exile_server\code\ExileServer_system_lootManager_network_spawnLootRequest.sqf'],
['ExileServer_system_money_network_putMoneyRequest', 'exile_server\code\ExileServer_system_money_network_putMoneyRequest.sqf'],
['ExileServer_system_money_network_takeMoneyRequest', 'exile_server\code\ExileServer_system_money_network_takeMoneyRequest.sqf'],
['ExileServer_system_network_dispatchIncomingMessage', 'exile_server\code\ExileServer_system_network_dispatchIncomingMessage.sqf'],
['ExileServer_system_network_setupEventHandlers', 'exile_server\code\ExileServer_system_network_setupEventHandlers.sqf'],
['ExileServer_system_network_event_onHandleDisconnect', 'exile_server\code\ExileServer_system_network_event_onHandleDisconnect.sqf'],
['ExileServer_system_network_event_onPlayerConnected', 'exile_server\code\ExileServer_system_network_event_onPlayerConnected.sqf'],
['ExileServer_system_network_event_onPlayerDisconnected', 'exile_server\code\ExileServer_system_network_event_onPlayerDisconnected.sqf'],
['ExileServer_system_network_send_broadcast', 'exile_server\code\ExileServer_system_network_send_broadcast.sqf'],
['ExileServer_system_network_send_to', 'exile_server\code\ExileServer_system_network_send_to.sqf'],
['ExileServer_system_party_network_inviteToPartyRequest', 'exile_server\code\ExileServer_system_party_network_inviteToPartyRequest.sqf'],
['ExileServer_system_party_network_kickFromPartyRequest', 'exile_server\code\ExileServer_system_party_network_kickFromPartyRequest.sqf'],
['ExileServer_system_party_network_updateMyPartyMarkerRequest', 'exile_server\code\ExileServer_system_party_network_updateMyPartyMarkerRequest.sqf'],
['ExileServer_system_playerSaveQueue_initialize', 'exile_server\code\ExileServer_system_playerSaveQueue_initialize.sqf'],
['ExileServer_system_playerSaveQueue_thread_savePlayer', 'exile_server\code\ExileServer_system_playerSaveQueue_thread_savePlayer.sqf'],
['ExileServer_system_process_noobFilter', 'exile_server\code\ExileServer_system_process_noobFilter.sqf'],
['ExileServer_system_process_postInit', 'exile_server\code\ExileServer_system_process_postInit.sqf'],
['ExileServer_system_process_preInit', 'exile_server\code\ExileServer_system_process_preInit.sqf'],
['ExileServer_system_rcon_initialize', 'exile_server\code\ExileServer_system_rcon_initialize.sqf'],
['ExileServer_system_rcon_setupEvents', 'exile_server\code\ExileServer_system_rcon_setupEvents.sqf'],
['ExileServer_system_rcon_event_clearBuffers', 'exile_server\code\ExileServer_system_rcon_event_clearBuffers.sqf'],
['ExileServer_system_rcon_event_kickAll', 'exile_server\code\ExileServer_system_rcon_event_kickAll.sqf'],
['ExileServer_system_rcon_event_kickAllrestart', 'exile_server\code\ExileServer_system_rcon_event_kickAllrestart.sqf'],
['ExileServer_system_rcon_event_ready', 'exile_server\code\ExileServer_system_rcon_event_ready.sqf'],
['ExileServer_system_rcon_event_sendCommand', 'exile_server\code\ExileServer_system_rcon_event_sendCommand.sqf'],
['ExileServer_system_rcon_thread_check', 'exile_server\code\ExileServer_system_rcon_thread_check.sqf'],
['ExileServer_system_russianRoulette_broadcastGameStatus', 'exile_server\code\ExileServer_system_russianRoulette_broadcastGameStatus.sqf'],
['ExileServer_system_russianRoulette_initialize', 'exile_server\code\ExileServer_system_russianRoulette_initialize.sqf'],
['ExileServer_system_russianRoulette_letNextPlayerFire', 'exile_server\code\ExileServer_system_russianRoulette_letNextPlayerFire.sqf'],
['ExileServer_system_russianRoulette_startGame', 'exile_server\code\ExileServer_system_russianRoulette_startGame.sqf'],
['ExileServer_system_russianRoulette_event_onPlayerDied', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerDied.sqf'],
['ExileServer_system_russianRoulette_event_onPlayerDisconnected', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerDisconnected.sqf'],
['ExileServer_system_russianRoulette_event_onPlayerJoined', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerJoined.sqf'],
['ExileServer_system_russianRoulette_event_onPlayerLeft', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerLeft.sqf'],
['ExileServer_system_russianRoulette_event_onPlayerWin', 'exile_server\code\ExileServer_system_russianRoulette_event_onPlayerWin.sqf'],
['ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse', 'exile_server\code\ExileServer_system_russianRoulette_network_fireRussianRouletteRevolverResponse.sqf'],
['ExileServer_system_russianRoulette_network_joinRussianRouletteRequest', 'exile_server\code\ExileServer_system_russianRoulette_network_joinRussianRouletteRequest.sqf'],
['ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest', 'exile_server\code\ExileServer_system_russianRoulette_network_leaveRussianRouletteRequest.sqf'],
['ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest', 'exile_server\code\ExileServer_system_russianRoulette_network_requestJoinRussianRouletteDialogRequest.sqf'],
['ExileServer_system_session_begin', 'exile_server\code\ExileServer_system_session_begin.sqf'],
['ExileServer_system_session_createId', 'exile_server\code\ExileServer_system_session_createId.sqf'],
['ExileServer_system_session_end', 'exile_server\code\ExileServer_system_session_end.sqf'],
['ExileServer_system_session_getPlayerObject', 'exile_server\code\ExileServer_system_session_getPlayerObject.sqf'],
['ExileServer_system_session_isRegisteredId', 'exile_server\code\ExileServer_system_session_isRegisteredId.sqf'],
['ExileServer_system_session_update', 'exile_server\code\ExileServer_system_session_update.sqf'],
['ExileServer_system_session_network_startSessionRequest', 'exile_server\code\ExileServer_system_session_network_startSessionRequest.sqf'],
['ExileServer_system_session_network_updateSessionRequest', 'exile_server\code\ExileServer_system_session_network_updateSessionRequest.sqf'],
['ExileServer_system_simulationMonitor_addVehicle', 'exile_server\code\ExileServer_system_simulationMonitor_addVehicle.sqf'],
['ExileServer_system_simulationMonitor_initialize', 'exile_server\code\ExileServer_system_simulationMonitor_initialize.sqf'],
['ExileServer_system_simulationMonitor_removeVehicle', 'exile_server\code\ExileServer_system_simulationMonitor_removeVehicle.sqf'],
['ExileServer_system_simulationMonitor_network_enableSimulationRequest', 'exile_server\code\ExileServer_system_simulationMonitor_network_enableSimulationRequest.sqf'],
['ExileServer_system_simulationMonitor_thread_toggleSimulation', 'exile_server\code\ExileServer_system_simulationMonitor_thread_toggleSimulation.sqf'],
['ExileServer_system_slothMachine_network_slothMachineRequest', 'exile_server\code\ExileServer_system_slothMachine_network_slothMachineRequest.sqf'],
['ExileServer_system_swapOwnershipQueue_add', 'exile_server\code\ExileServer_system_swapOwnershipQueue_add.sqf'],
['ExileServer_system_swapOwnershipQueue_initialize', 'exile_server\code\ExileServer_system_swapOwnershipQueue_initialize.sqf'],
['ExileServer_system_swapOwnershipQueue_thread_dispatchQueue', 'exile_server\code\ExileServer_system_swapOwnershipQueue_thread_dispatchQueue.sqf'],
['ExileServer_system_territory_create', 'exile_server\code\ExileServer_system_territory_create.sqf'],
['ExileServer_system_territory_updateNearConstructions', 'exile_server\code\ExileServer_system_territory_updateNearConstructions.sqf'],
['ExileServer_system_territory_updateNearContainers', 'exile_server\code\ExileServer_system_territory_updateNearContainers.sqf'],
['ExileServer_system_territory_updateNumberOfConstructions', 'exile_server\code\ExileServer_system_territory_updateNumberOfConstructions.sqf'],
['ExileServer_system_territory_updateRights', 'exile_server\code\ExileServer_system_territory_updateRights.sqf'],
['ExileServer_system_territory_database_insert', 'exile_server\code\ExileServer_system_territory_database_insert.sqf'],
['ExileServer_system_territory_database_load', 'exile_server\code\ExileServer_system_territory_database_load.sqf'],
['ExileServer_system_territory_maintenance_recalculateDueDate', 'exile_server\code\ExileServer_system_territory_maintenance_recalculateDueDate.sqf'],
['ExileServer_system_territory_network_addToTerritoryRequest', 'exile_server\code\ExileServer_system_territory_network_addToTerritoryRequest.sqf'],
['ExileServer_system_territory_network_flagStolenRequest', 'exile_server\code\ExileServer_system_territory_network_flagStolenRequest.sqf'],
['ExileServer_system_territory_network_moderationTerritoryRequest', 'exile_server\code\ExileServer_system_territory_network_moderationTerritoryRequest.sqf'],
['ExileServer_system_territory_network_payFlagRansomRequest', 'exile_server\code\ExileServer_system_territory_network_payFlagRansomRequest.sqf'],
['ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest', 'exile_server\code\ExileServer_system_territory_network_payTerritoryProtectionMoneyRequest.sqf'],
['ExileServer_system_territory_network_purchaseTerritory', 'exile_server\code\ExileServer_system_territory_network_purchaseTerritory.sqf'],
['ExileServer_system_territory_network_removeFromTerritoryRequest', 'exile_server\code\ExileServer_system_territory_network_removeFromTerritoryRequest.sqf'],
['ExileServer_system_territory_network_requestTerritoryUpgradeDialog', 'exile_server\code\ExileServer_system_territory_network_requestTerritoryUpgradeDialog.sqf'],
['ExileServer_system_territory_network_restoreFlagRequest', 'exile_server\code\ExileServer_system_territory_network_restoreFlagRequest.sqf'],
['ExileServer_system_territory_network_territoryUpgradeRequest', 'exile_server\code\ExileServer_system_territory_network_territoryUpgradeRequest.sqf'],
['ExileServer_system_thread_addTask', 'exile_server\code\ExileServer_system_thread_addTask.sqf'],
['ExileServer_system_thread_initialize', 'exile_server\code\ExileServer_system_thread_initialize.sqf'],
['ExileServer_system_thread_removeTask', 'exile_server\code\ExileServer_system_thread_removeTask.sqf'],
['ExileServer_system_thread_threadAdjust', 'exile_server\code\ExileServer_system_thread_threadAdjust.sqf'],
['ExileServer_system_trading_network_purchaseItemRequest', 'exile_server\code\ExileServer_system_trading_network_purchaseItemRequest.sqf'],
['ExileServer_system_trading_network_purchaseVehicleRequest', 'exile_server\code\ExileServer_system_trading_network_purchaseVehicleRequest.sqf'],
['ExileServer_system_trading_network_purchaseVehicleSkinRequest', 'exile_server\code\ExileServer_system_trading_network_purchaseVehicleSkinRequest.sqf'],
['ExileServer_system_trading_network_sellItemRequest', 'exile_server\code\ExileServer_system_trading_network_sellItemRequest.sqf'],
['ExileServer_system_trading_network_wasteDumpRequest', 'exile_server\code\ExileServer_system_trading_network_wasteDumpRequest.sqf'],
['ExileServer_system_vehicleSaveQueue_addVehicle', 'exile_server\code\ExileServer_system_vehicleSaveQueue_addVehicle.sqf'],
['ExileServer_system_vehicleSaveQueue_initialize', 'exile_server\code\ExileServer_system_vehicleSaveQueue_initialize.sqf'],
['ExileServer_system_vehicleSaveQueue_removeVehicle', 'exile_server\code\ExileServer_system_vehicleSaveQueue_removeVehicle.sqf'],
['ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest', 'exile_server\code\ExileServer_system_vehicleSaveQueue_network_vehicleSaveRequest.sqf'],
['ExileServer_system_vehicleSaveQueue_thread_saveVehicles', 'exile_server\code\ExileServer_system_vehicleSaveQueue_thread_saveVehicles.sqf'],
['ExileServer_system_weather_initialize', 'exile_server\code\ExileServer_system_weather_initialize.sqf'],
['ExileServer_system_weather_thread_weatherSimulation', 'exile_server\code\ExileServer_system_weather_thread_weatherSimulation.sqf'],
['ExileServer_system_xm8_send', 'exile_server\code\ExileServer_system_xm8_send.sqf'],
['ExileServer_system_xm8_sendBaseRaid', 'exile_server\code\ExileServer_system_xm8_sendBaseRaid.sqf'],
['ExileServer_system_xm8_sendFlagRestored', 'exile_server\code\ExileServer_system_xm8_sendFlagRestored.sqf'],
['ExileServer_system_xm8_sendFlagStolen', 'exile_server\code\ExileServer_system_xm8_sendFlagStolen.sqf'],
['ExileServer_system_xm8_sendProtectionMoneyDue', 'exile_server\code\ExileServer_system_xm8_sendProtectionMoneyDue.sqf'],
['ExileServer_system_xm8_sendProtectionMoneyPaid', 'exile_server\code\ExileServer_system_xm8_sendProtectionMoneyPaid.sqf'],
['ExileServer_util_getFragKiller', 'exile_server\code\ExileServer_util_getFragKiller.sqf'],
['ExileServer_util_getFragPerks', 'exile_server\code\ExileServer_util_getFragPerks.sqf'],
['ExileServer_util_getFragType', 'exile_server\code\ExileServer_util_getFragType.sqf'],
['ExileServer_util_getItemCargo', 'exile_server\code\ExileServer_util_getItemCargo.sqf'],
['ExileServer_util_getObjectContainerCargo', 'exile_server\code\ExileServer_util_getObjectContainerCargo.sqf'],
['ExileServer_util_log', 'exile_server\code\ExileServer_util_log.sqf'],
['ExileServer_util_setDamageTexture', 'exile_server\code\ExileServer_util_setDamageTexture.sqf'],
['ExileServer_util_extDB2_createMessage', 'exile_server\code\ExileServer_util_extDB2_createMessage.sqf'],
['ExileServer_util_fill_fillContainers', 'exile_server\code\ExileServer_util_fill_fillContainers.sqf'],
['ExileServer_util_fill_fillItems', 'exile_server\code\ExileServer_util_fill_fillItems.sqf'],
['ExileServer_util_fill_fillMagazines', 'exile_server\code\ExileServer_util_fill_fillMagazines.sqf'],
['ExileServer_util_fill_fillWeapons', 'exile_server\code\ExileServer_util_fill_fillWeapons.sqf'],
['ExileServer_util_time_addTime', 'exile_server\code\ExileServer_util_time_addTime.sqf'],
['ExileServer_util_time_currentTime', 'exile_server\code\ExileServer_util_time_currentTime.sqf'],
['ExileServer_util_time_toArma', 'exile_server\code\ExileServer_util_time_toArma.sqf'],
['ExileServer_util_time_toMinutes', 'exile_server\code\ExileServer_util_time_toMinutes.sqf'],
['ExileServer_util_time_uptime', 'exile_server\code\ExileServer_util_time_uptime.sqf'],
['ExileServer_world_calculateVehicleGrid', 'exile_server\code\ExileServer_world_calculateVehicleGrid.sqf'],
['ExileServer_world_initialize', 'exile_server\code\ExileServer_world_initialize.sqf'],
['ExileServer_world_loadAllClans', 'exile_server\code\ExileServer_world_loadAllClans.sqf'],
['ExileServer_world_loadAllDatabaseConstructions', 'exile_server\code\ExileServer_world_loadAllDatabaseConstructions.sqf'],
['ExileServer_world_loadAllDatabaseContainers', 'exile_server\code\ExileServer_world_loadAllDatabaseContainers.sqf'],
['ExileServer_world_loadAllDatabaseVehicles', 'exile_server\code\ExileServer_world_loadAllDatabaseVehicles.sqf'],
['ExileServer_world_loadAllTerritories', 'exile_server\code\ExileServer_world_loadAllTerritories.sqf'],
['ExileServer_world_spawnSpawnZoneVehicles', 'exile_server\code\ExileServer_world_spawnSpawnZoneVehicles.sqf'],
['ExileServer_world_spawnVehicles', 'exile_server\code\ExileServer_world_spawnVehicles.sqf']
];
call ExileServer_system_process_preInit;
true

View File

@ -0,0 +1,50 @@
/**
* ExileServer_object_bush_network_chopBushRequest
*
* 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["_sessionId","_parameters","_bushNetId","_bush","_isBush","_bushModelNames","_newDamage","_weaponHolderPosition","_weaponHolder"];
_sessionId = _this select 0;
_parameters = _this select 1;
_bushNetId = _parameters select 0;
_bush = objectFromNetId _bushNetId;
if (!isNull _bush) then
{
_isBush = false;
_bushModelNames = getArray(missionConfigFile >> "CfgInteractionModels" >> "BushSource" >> "models");
{
if !(((str _bush) find _x) isEqualTo -1)exitWith {_isBush = true};
}
forEach _bushModelNames;
if (_isBush) then
{
if (alive _bush) then
{
_newDamage = ((damage _bush) + 0.1) min 1;
_bush setDamage _newDamage;
if (_newDamage isEqualTo 1) then
{
_bush setDamage 999;
_weaponHolderPosition = [getPosATL _bush, 3] call ExileClient_util_math_getRandomPositionInCircle;
_weaponHolderPosition set [2, 0];
_weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"];
_weaponHolder setPosATL _weaponHolderPosition;
if ((random 100) < 50) then
{
_weaponHolder addMagazineCargoGlobal ["Exile_Item_WoodSticks", 1];
}
else
{
_weaponHolder addMagazineCargoGlobal ["Exile_Item_Leaves", 1];
};
};
};
};
};
true

View File

@ -0,0 +1,32 @@
/**
* ExileServer_object_concreteMixer_mixingProcess
*
* 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["_concreteMixer","_recipeClassName","_weaponHolderPosition","_weaponHolder"];
_concreteMixer = _this select 0;
_recipeClassName = _this select 1;
playSound3D ["exile_assets\sound\Exile_ConcreteMixer01.wss", _concreteMixer, false, getPosASL _concreteMixer, 4, 1, 50];
_concreteMixer setVariable ["IsMixing", true];
_concreteMixer animateSource ["SpinSource", 0, true];
_concreteMixer animateSource ["SpinSource", 1, false];
uiSleep 5;
["concreteMixerAddSmokeRequest", [netId _concreteMixer]] call ExileServer_system_network_send_broadcast;
uisleep 50;
["concreteMixerRemoveSmokeRequest", [netId _concreteMixer]] call ExileServer_system_network_send_broadcast;
uiSleep 5;
_weaponHolderPosition = _concreteMixer modelToWorld [1, 0, 0];
_weaponHolderPosition set [2, 0];
_weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"];
_weaponHolder setPosATL _weaponHolderPosition;
{
_weaponHolder addMagazineCargoGlobal [_x select 1, _x select 0];
}
forEach getArray (missionConfigFile >> "CfgCraftingRecipes" >> _recipeClassName >> "returnedItems");
_concreteMixer setVariable ["IsMixing", false];

View File

@ -0,0 +1,77 @@
/**
* ExileServer_object_concreteMixer_network_concreteMixerStartRequest
*
* 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["_sessionID","_parameters","_concreteMixerNetID","_recipeClassName","_player","_concreteMixer","_recipeConfig","_components","_equippedMagazines","_hasAllComponents","_componentQuantity","_componentItemClassName","_equippedComponentQuantity","_i"];
_sessionID = _this select 0;
_parameters = _this select 1;
_concreteMixerNetID = _parameters select 0;
_recipeClassName = _parameters select 1;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "Unknown player!";
};
if !(alive _player) then
{
throw "The dead cannot use the concrete mixer!";
};
_concreteMixer = objectFromNetid _concreteMixerNetID;
if (isNull _concreteMixer) then
{
throw "Unknown concrete mixer!";
};
if (_concreteMixer getVariable ["IsMixing", false]) then
{
throw "Concrete mixer is already in use!";
};
if ((_player distance _concreteMixer) > 10) then
{
throw "No long distance mixing!";
};
if !(isClass (missionConfigFile >> "CfgCraftingRecipes" >> _recipeClassName)) then
{
throw "Invalid mixing recipe!";
};
_recipeConfig = missionConfigFile >> "CfgCraftingRecipes" >> _recipeClassName;
_components = getArray(_recipeConfig >> "components");
_equippedMagazines = magazines _player;
_hasAllComponents = true;
{
_componentQuantity = _x select 0;
_componentItemClassName = _x select 1;
_equippedComponentQuantity = { _x == _componentItemClassName } count _equippedMagazines;
if (_equippedComponentQuantity < _componentQuantity ) then
{
_hasAllComponents = false;
};
}
forEach _components;
if !(_hasAllComponents) then
{
throw "Missing components!";
};
{
_componentQuantity = _x select 0;
_componentItemClassName = _x select 1;
for "_i" from 1 to _componentQuantity do
{
_player removeItem _componentItemClassName;
};
}
forEach _components;
[_concreteMixer, _recipeClassName] spawn ExileServer_object_concreteMixer_mixingProcess;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleOnly", [_exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,19 @@
/**
* ExileServer_object_construction_database_delete
*
* 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["_constructionObject","_constructionID"];
_constructionObject = _this;
_constructionID = _constructionObject getVariable ["ExileDatabaseID", -1];
if (_constructionID > -1) then
{
format ["deleteConstruction:%1", _constructionID] call ExileServer_system_database_query_fireAndForget;
};
true

View File

@ -0,0 +1,38 @@
/**
* ExileServer_object_construction_database_insert
*
* 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["_constructionObject","_position","_vectorDirection","_vectorUp","_territoryFlag","_territoryID","_data","_extDB2Message","_constructionID"];
_constructionObject = _this;
_position = getPosATL _constructionObject;
_vectorDirection = vectorDir _constructionObject;
_vectorUp = vectorUp _constructionObject;
_territoryFlag = _constructionObject call ExileClient_util_world_getTerritoryAtPosition;
_territoryID = if (isNull _territoryFlag) then { 'NULL' } else { _territoryFlag getVariable ["ExileDatabaseID", 'NULL']};
_data =
[
typeOf _constructionObject,
_constructionObject getVariable ["ExileOwnerUID", ""],
_position select 0,
_position select 1,
_position select 2,
_vectorDirection select 0,
_vectorDirection select 1,
_vectorDirection select 2,
_vectorUp select 0,
_vectorUp select 1,
_vectorUp select 2,
_territoryID
];
_extDB2Message = ["insertConstruction", _data] call ExileServer_util_extDB2_createMessage;
_constructionID = _extDB2Message call ExileServer_system_database_query_insertSingle;
_constructionObject setVariable ["ExileDatabaseID", _constructionID];
_constructionObject setVariable ["ExileTerritoryID", _territoryID];
_constructionID

View File

@ -0,0 +1,52 @@
/**
* ExileServer_object_construction_database_load
*
* 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["_constructionID","_data","_position","_vectorDirection","_vectorUp","_constructionObject","_damageLevel","_public","_pinCode"];
_constructionID = _this;
_data = format ["loadConstruction:%1", _constructionID] call ExileServer_system_database_query_selectSingle;
_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];
_constructionObject = createVehicle [(_data select 1), _position, [], 0, "CAN_COLLIDE"];
_constructionObject setPosATL _position;
_constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp];
_constructionObject setVariable ["ExileDatabaseID", (_data select 0)];
_constructionObject setVariable ["ExileOwnerUID", (_data select 2)];
_constructionObject setVariable ["ExileIsPersistent", true];
_constructionObject setVariable ["ExileTerritoryID", (_data select 15)];
_damageLevel = (_data select 17);
_public = _damageLevel > 0;
_constructionObject setVariable ["ExileConstructionDamage",_damageLevel,_public];
if(_public)then
{
_constructionObject call ExileServer_util_setDamageTexture;
};
_pinCode = _data select 14;
if !(_pinCode isEqualTo "000000") then
{
_constructionObject setVariable ["ExileAccessCode", _pinCode];
_constructionObject setVariable ["ExileIsLocked", (_data select 13), true];
};
if (getNumber(configFile >> "CfgVehicles" >> (_data select 1) >> "exileRequiresSimulation") isEqualTo 1) then
{
_constructionObject enableSimulationGlobal true;
_constructionObject call ExileServer_system_simulationMonitor_addVehicle;
}
else
{
_constructionObject enableSimulationGlobal false;
};
_constructionObject setVelocity [0, 0, 0];
_constructionObject setPosATL _position;
_constructionObject setVelocity [0, 0, 0];
_constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp];
_constructionObject setVelocity [0, 0, 0];
_constructionObject

View File

@ -0,0 +1,17 @@
/**
* ExileServer_object_construction_database_lockUpdate
*
* 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["_door","_databaseID","_lock"];
_door = _this;
_databaseID = _door getVariable ["ExileDatabaseID",0];
_lock = _door getVariable ["ExileIsLocked",1];
format ["updateLock:%1:%2",_lock,_databaseID] call ExileServer_system_database_query_fireAndForget;
true

View File

@ -0,0 +1,15 @@
/**
* ExileServer_object_construction_event_onMpKilled
*
* 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["_object"];
_object = _this;
_object call ExileServer_object_construction_database_delete;
deleteVehicle _object;

View File

@ -0,0 +1,54 @@
/**
* ExileServer_object_construction_network_addLockRequest
*
* 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["_sessionID","_paramaters","_door","_pincode","_playerObject","_databaseID"];
_sessionID = _this select 0;
_paramaters = _this select 1;
_door = _paramaters select 0;
_pincode = _paramaters select 1;
try
{
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
if !("Exile_Item_Codelock" in (magazines _playerObject)) then
{
throw "No can do.";
};
if !(isNumber(configFile >> "CfgVehicles" >> (typeOf _door) >> "exileIsDoor")) then
{
throw "Really no can do.";
};
if !((_door getVariable ["ExileIsLocked",""]) isEqualTo "") then
{
throw "Really really no can do.";
};
if !((count _pincode) isEqualTo 4) then
{
throw "Invalid PIN. Please try again.";
};
if ((_door animationPhase 'DoorRotation') > 0.5) then
{
throw "Please close the door first.";
};
_databaseID = _door getVariable ["ExileDatabaseID",0];
if(_databaseID isEqualTo 0) then
{
throw "Smt went goof";
};
_door setVariable ["ExileIsLocked",-1,true];
_door setVariable ["ExileAccessCode",_pincode];
format ["addDoorLock:%1:%2",_pincode,_databaseID] call ExileServer_system_database_query_fireAndForget;
[_sessionID,"addLockResponse",[_pincode]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to add lock!", _exception]]] call ExileServer_system_network_send_to;
_exception call ExileServer_util_log;
};

View File

@ -0,0 +1,83 @@
/**
* ExileServer_object_construction_network_buildConstructionRequest
*
* 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["_sessionID","_parameters","_objectClassName","_objectPosition","_playerObject","_constructionConfig","_canBuildHereResult","_object"];
_sessionID = _this select 0;
_parameters = _this select 1;
_objectClassName = _parameters select 0;
_objectPosition = _parameters select 1;
try
{
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _playerObject) then
{
throw "Player object is null!";
};
_constructionConfig = ("getText(_x >> 'previewObject') == _objectClassName" configClasses(configFile >> "CfgConstruction")) select 0;
_canBuildHereResult = [configName _constructionConfig, (ASLtoAGL (ATLtoASL _objectPosition)), getPlayerUID _playerObject] call ExileClient_util_world_canBuildHere;
switch (_canBuildHereResult) do
{
case 1:
{
throw "You are not in your territory.";
};
case 11:
{
throw "You are too close to a concrete mixer.";
};
case 10:
{
throw "Building is blocked here.";
};
case 2:
{
throw "You are inside enemy territory.";
};
case 8:
{
throw "You are in a contaminated zone.";
};
case 3:
{
throw "This cannot be placed on roads.";
};
case 5:
{
throw "You are too close to a spawn zone.";
};
case 4:
{
throw "You are too close to traders.";
};
case 6:
{
throw "Maximum number of objects reached.";
};
case 7:
{
throw "This snap location is already being used.";
};
};
_object = createVehicle[_objectClassName, _objectPosition, [], 0, "CAN_COLLIDE"];
_object setPosATL _objectPosition;
_object setVariable ["BIS_enableRandomization", false];
_object setOwner (owner _playerObject);
_object enableSimulationGlobal false;
_object setVariable ["ExileOwnerUID", getPlayerUID _playerObject];
_playerObject setVariable ["ExileConstructionObject", _object];
[_object, _playerObject] call ExileServer_system_swapOwnershipQueue_add;
[_sessionID, "constructionResponse", [netid _object]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Construction aborted!", _exception]]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,75 @@
/**
* ExileServer_object_construction_network_buildTerritoryRequest
*
* 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["_sessionID","_paramaters","_objectClassName","_objectPosition","_flag","_territoryName","_alphabet","_forbiddenCharacter","_playerObject","_minimumDistanceToTraderZones","_minimumDistanceToSpawnZones","_maximumTerritoryRadius","_object"];
_sessionID = _this select 0;
_paramaters = _this select 1;
_objectClassName = _paramaters select 0;
_objectPosition = _paramaters select 1;
_flag = _paramaters select 2;
_territoryName = _paramaters select 3;
try
{
_territoryName = _territoryName call ExileClient_util_string_trim;
_alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet");
_forbiddenCharacter = [_territoryName, _alphabet] call ExileClient_util_string_containsForbiddenCharacter;
if !(_forbiddenCharacter isEqualTo -1) then
{
throw "Forbidden Character";
};
if !(_objectClassName isEqualTo "Exile_Construction_Flag_Preview") then
{
throw "What a hell are you doing";
};
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _playerObject) then
{
throw "Invalid Player Object";
};
_minimumDistanceToTraderZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToTraderZones");
if ([_objectPosition, _minimumDistanceToTraderZones] call ExileClient_util_world_isTraderZoneInRange) then
{
throw "You cannot build close to trader zones.";
};
_minimumDistanceToSpawnZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToSpawnZones");
if ([_objectPosition, _minimumDistanceToSpawnZones] call ExileClient_util_world_isSpawnZoneInRange) then
{
throw "You cannot build close to spawn zones.";
};
_maximumTerritoryRadius = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToOtherTerritories");
if ([_objectPosition, _maximumTerritoryRadius] call ExileClient_util_world_isTerritoryInRange) then
{
throw "You are too close to enemy territory.";
};
_object = createVehicle[_objectClassName, _objectPosition, [], 0, "CAN_COLLIDE"];
_object setPos _objectPosition;
_object enableSimulationGlobal true;
if (isClass (configFile >> "CfgFlagsNative" >> _flag)) then
{
_flag = getText(configFile >> "CfgFlagsNative" >> _flag >> "texture");
}
else
{
_flag = getText(missionConfigFile >> "CfgFlags" >> _flag >> "texture");
};
_object setVariable ["ExileFlagTexture",_flag];
_object setFlagTexture _flag;
_object setVariable ["ExileTerritoryName",_territoryName];
_object setVariable ["ExileOwnerUID",getPlayerUID _playerObject,true];
[_object, _playerObject] call ExileServer_system_swapOwnershipQueue_add;
[_sessionID, "constructionResponse", [netid _object]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Construction aborted!", _exception]]] call ExileServer_system_network_send_to;
_exception call ExileServer_util_log;
};
true

View File

@ -0,0 +1,96 @@
/**
* ExileServer_object_construction_network_deconstructConstructionRequest
*
* 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["_sessionID","_parameters","_objectNetID","_object","_playerObject","_playerUID","_objectID","_ownerUID","_canDeconstruct","_flag","_buildRights","_message","_constructionConfig","_holderPosition","_holder"];
_sessionID = _this select 0;
_parameters = _this select 1;
_objectNetID = _parameters select 0;
try
{
_object = objectFromNetId _objectNetID;
if (isNull _object) then
{
throw "Construction object is null.";
};
if (_object isKindOf "Exile_Construction_Abstract_Physics") then
{
throw "You can only deconstruct static objects.";
};
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _playerObject) then
{
throw "Player object is null.";
};
_playerUID = getPlayerUID _playerObject;
_objectID = _object getVariable ["ExileDatabaseID", -1];
if (_objectID isEqualTo -1) then
{
throw "Construction object is not saved in database.";
};
_ownerUID = _object getVariable ["ExileOwnerUID", -1];
if (_ownerUID isEqualTo -1) then
{
throw "Object has no owner.";
};
_canDeconstruct = false;
_flag = _object call ExileClient_util_world_getTerritoryAtPosition;
if (_playerUID isEqualTo _ownerUID) then
{
_canDeconstruct = true;
}
else
{
if !(isNull _flag) then
{
_buildRights = _flag getVariable ["ExileTerritoryBuildRights",[]];
if (_playerUID in _buildRights) then
{
_canDeconstruct = true;
};
};
};
if (_canDeconstruct) then
{
_object call ExileServer_object_construction_database_delete;
_message = "The object was not refunded, since it was damaged.";
if (_object getVariable ["ExileConstructionDamage",0] isEqualTo 0)then
{
_constructionConfig = ("(getText(_x >> 'staticObject') isEqualTo (typeOf _object))" configClasses (configFile >> "CfgConstruction")) select 0;
_holderPosition = getPosATL _playerObject;
_holder = createVehicle ["GroundWeaponHolder", _holderPosition, [], 0, "CAN_COLLIDE"];
_holder setPosATL _holderPosition;
{
_holder addMagazineCargoGlobal [_x, 1];
}
forEach getArray (_constructionConfig >> "refundObjects");
if !((_object getVariable ["ExileAccessCode", -1]) isEqualTo -1) then
{
_holder addMagazineCargoGlobal ["Exile_Item_Codelock", 1];
};
_message = "Aaaand, it's gone!";
};
deleteVehicle _object;
if !(isNull _flag) then
{
_flag call ExileServer_system_territory_updateNumberOfConstructions;
};
[_sessionID, "toastRequest", ["SuccessTitleAndText", ["Object deconstructed!", _message]]] call ExileServer_system_network_send_to;
}
else
{
throw "You have no permission to deconstruct this.";
};
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to deconstruct!", _exception]]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,108 @@
/**
* ExileServer_object_construction_network_moveConstructionRequest
*
* 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["_sessionID","_parameters","_objectNetID","_object","_objectClassname","_isContainer","_playerObject","_playerUID","_objectID","_ownerUID","_canMove","_flag","_buildRights","_money","_holderPosition","_holder"];
_sessionID = _this select 0;
_parameters = _this select 1;
_objectNetID = _parameters select 0;
try
{
_object = objectFromNetId _objectNetID;
_objectClassname = typeOf _object;
_isContainer = isNumber(configFile >> "CfgVehicles" >> _objectClassname >> "exileContainer");
if (isNull _object) then
{
throw "Construction object is null!";
};
if (_object isKindOf "Exile_Construction_Abstract_Physics") then
{
throw "You can only move static objects!";
};
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _playerObject) then
{
throw "Player object is null!";
};
if (_object getVariable ["ExileConstructionDamage",0] > 0)then
{
throw "You cant move Damaged objects, repair it first";
};
_playerUID = getPlayerUID _playerObject;
_objectID = _object getVariable ["ExileDatabaseID", -1];
if (_objectID isEqualTo -1) then
{
throw "Construction object is not saved in database!";
};
_ownerUID = _object getVariable ["ExileOwnerUID", -1];
if (_ownerUID isEqualTo -1) then
{
throw "Object has no owner!";
};
_canMove = false;
_flag = _object call ExileClient_util_world_getTerritoryAtPosition;
if ((_flag getVariable ["ExileFlagStolen", 0]) isEqualTo 1) then
{
throw "You cannot move parts while your flag is stolen.";
};
if (_playerUID isEqualTo _ownerUID) then
{
_canMove = true;
}
else
{
if !(isNull _flag) then
{
_buildRights = _flag getVariable ["ExileTerritoryBuildRights",[]];
if (_playerUID in _buildRights) then
{
_canMove = true;
};
};
};
if !(_canMove) then
{
throw "You have no permission to move this!";
};
if (_isContainer) then
{
_money = _object getVariable ["ExileMoney", 0];
ExileContainerCargo =
[
_object call ExileServer_util_getItemCargo,
magazinesAmmoCargo _object,
weaponsItemsCargo _object,
_object call ExileServer_util_getObjectContainerCargo,
_money
];
_object call ExileServer_object_container_database_delete;
} else
{
if !((_object getVariable ["ExileAccessCode", -1]) isEqualTo -1) then
{
_holderPosition = getPosATL _playerObject;
_holder = createVehicle ["GroundWeaponHolder", _holderPosition, [], 0, "CAN_COLLIDE"];
_holder setPosATL _holderPosition;
_holder addMagazineCargoGlobal ["Exile_Item_Codelock", 1];
};
_object call ExileServer_object_construction_database_delete;
};
deleteVehicle _object;
if !(isNull _flag) then
{
_flag call ExileServer_system_territory_updateNumberOfConstructions;
};
[_sessionID, "constructionMoveResponse", [true, typeOf _object]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "constructionMoveResponse", [false, _exception]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,50 @@
/**
* ExileServer_object_construction_network_repairConstructionRequest
*
* 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["_sessionID","_parameters","_constructionObject","_object","_requestingPlayer","_repairKitClass","_databaseId"];
_sessionID = _this select 0;
_parameters = _this select 1;
_constructionObject = _parameters select 0;
try
{
if (isNull _object) then
{
throw "Construction object is null!";
};
_requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _requestingPlayer)then
{
throw "Player null";
};
_repairKitClass = _constructionObject call ExileClient_util_breaching_getRepairMag;
if(_repairKitClass isEqualTo "")then
{
throw "Invalid repair kit.";
};
if!(_repairKitClass in (magazines _requestingPlayer))then
{
throw "You do not have a repair kit.";
};
_databaseId = _constructionObject getVariable ["ExileDatabaseID",-1];
if(_databaseId isEqualTo -1)then
{
Throw "database ID null";
};
_constructionObject setVariable ["ExileConstructionDamage",0,true];
format ["updateDamage:0:%1",_databaseId] call ExileServer_system_database_query_fireAndForget;
_constructionObject call ExileServer_util_setDamageTexture;
[_requestingPlayer,"repairConstructionResponse",[_repairKitClass]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to repair!", _exception]]] call ExileServer_system_network_send_to;
_exception call ExileServer_util_log;
};

View File

@ -0,0 +1,57 @@
/**
* ExileServer_object_construction_network_swapConstructionRequest
*
* 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["_sessionID","_paramaters","_fromVehicleNetID","_toVehicleClassName","_objectProperties","_position","_vectorDirection","_vectorUp","_velocity","_fromVehicle","_flagTexture","_territoryName","_isContainer","_alphabet","_forbiddenCharacter","_toVehicle","_playerObject","_flag"];
_sessionID = _this select 0;
_paramaters = _this select 1;
_fromVehicleNetID = _paramaters select 0;
_toVehicleClassName = _paramaters select 1;
_objectProperties = _paramaters select 2;
_position = _objectProperties select 0;
_vectorDirection = _objectProperties select 1;
_vectorUp = _objectProperties select 2;
_velocity = _objectProperties select 3;
_fromVehicle = objectFromNetId _fromVehicleNetID;
_flagTexture = _fromVehicle getVariable ["ExileFlagTexture","Kappa"];
_territoryName = _fromVehicle getVariable ["ExileTerritoryName","Kappa"];
_isContainer = isNumber(configFile >> "CfgVehicles" >> _toVehicleClassName >> "exileContainer");
_territoryName = _territoryName call ExileClient_util_string_trim;
_alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet");
_forbiddenCharacter = [_territoryName, _alphabet] call ExileClient_util_string_containsForbiddenCharacter;
if!(_forbiddenCharacter isEqualTo -1)exitWith{format ["Invalid teritory name: %1",_territoryName] call ExileServer_util_log;};
deleteVehicle _fromVehicle;
_toVehicle = createVehicle[_toVehicleClassName, _position, [], 0, "CAN_COLLIDE"];
_toVehicle setVelocity _velocity;
_toVehicle setVectorDirAndUp [_vectorDirection, _vectorUp];
_toVehicle setPosATL _position;
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
_toVehicle setVariable ["ExileOwnerUID",getPlayerUID _playerObject,true];
_toVehicle setVariable ["ExileIsPersistent",true];
_toVehicle call ExileServer_util_vehicle_enableSimulationIfRequired;
switch (true) do
{
case (!(_flagTexture isEqualTo "Kappa")) :
{
[_toVehicle,_territoryName,_flagTexture] call ExileServer_system_territory_create;
[_toVehicle,_territoryName,_flagTexture] call ExileServer_system_territory_database_insert;
_toVehicle call ExileServer_system_territory_updateNearContainers;
_toVehicle call ExileServer_system_territory_updateNearConstructions;
};
case (_isContainer) : { _toVehicle call ExileServer_object_container_database_insert; };
default { _toVehicle call ExileServer_object_construction_database_insert; };
};
_flag = _toVehicle call ExileClient_util_world_getTerritoryAtPosition;
if !(isNull _flag) then
{
_flag call ExileServer_system_territory_updateNumberOfConstructions;
};
_playerObject setVariable ["ExileConstructionObject", nil];
true

View File

@ -0,0 +1,85 @@
/**
* ExileServer_object_construction_network_upgradeConstructionRequest
*
* 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["_sessionID","_parameters","_object","_playerObject","_maxRange","_flags","_buildRights","_objectConfig","_objectClass","_position","_vectorUp","_vectorDir","_objectDatabaseID","_objectOwner","_accessCode","_newObject"];
_sessionID = _this select 0;
_parameters = _this select 1;
_object = _parameters select 0;
try
{
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
_maxRange = getArray(missionConfigFile >> "CfgTerritories" >> "prices");
_maxRange = (_maxRange select ((count _maxRange) -1)) select 1;
_flags = nearestObjects [_playerObject,["Exile_Construction_Flag_Static"],_maxRange];
if (_flags isEqualTo []) then
{
throw "You are retarded!";
};
_flags = _flags select 0;
_buildRights = _flags getVariable ["ExileTerritoryBuildRights",[]];
if !((getPlayerUID _playerObject) in _buildRights) then
{
throw "No territory access!";
};
if !("Exile_Item_FortificationUpgrade" in (magazines _playerObject)) then
{
throw "Really?";
};
if !(_object getVariable ["ExileConstructionDamage",0] isEqualTo 0)then
{
throw "Please repair the object first.";
};
_objectConfig =
"
isText(_x >> 'upgradeObject')
&&
getText(_x >> 'staticObject') isEqualTo (typeOf _object)
"
configClasses
(configFile >> 'CfgConstruction');
if (_objectConfig isEqualTo []) then
{
throw "Invalid Upgrade";
};
_objectConfig = _objectConfig select 0;
_objectClass = getText (_objectConfig >> "upgradeObject");
_position = getPosATL _object;
_vectorUp = vectorUp _object;
_vectorDir = vectorDir _object;
_objectDatabaseID = _object getVariable ["ExileDatabaseID",0];
_objectOwner = _object getVariable ["ExileOwnerUID",""];
if (_objectDatabaseID isEqualTo 0) then
{
throw "Invalid Database ID";
};
_accessCode = _object getVariable ["ExileAccessCode","000000"];
deleteVehicle _object;
format ["upgradeObject:%1:%2",_objectClass,_objectDatabaseID] call ExileServer_system_database_query_fireAndForget;
_newObject = createVehicle [_objectClass,_position,[],0,"CAN_COLIDE"];
_newObject setVariable ["ExileDatabaseID",_objectDatabaseID];
_newObject setVariable ["ExileOwnerUID",_objectOwner];
_newObject setVariable ["ExileIsPersistent",true];
_newObject setPosATL _position;
_newObject setVectorDirAndUp [_vectorDir,_vectorUp];
if !(_accessCode isEqualTo "000000") then
{
_newObject setVariable ["ExileAccessCode",_accessCode];
_newObject setVariable ["ExileIsLocked",0,true];
};
_newObject call ExileServer_util_vehicle_enableSimulationIfRequired;
[_sessionID,"upgradeConstructionResponse",[_newObject]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to upgrade!", _exception]]] call ExileServer_system_network_send_to;
_exception call ExileServer_util_log;
};
true

View File

@ -0,0 +1,30 @@
/**
* ExileServer_object_container_createContainer
*
* 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["_className","_position","_direction","_containerObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_containerObject = createVehicle [_className, _position, [], 0, "CAN_COLLIDE"];
clearBackpackCargoGlobal _containerObject;
clearItemCargoGlobal _containerObject;
clearMagazineCargoGlobal _containerObject;
clearWeaponCargoGlobal _containerObject;
_containerObject setDir _direction;
_containerObject setPosATL _position;
_containerObject setVariable ["ExileIsPersistent", true];
_containerObject setVariable ["ExileIsContainer", true];
if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsLockable") isEqualTo 1)then
{
_containerObject setVariable ["ExileIsLocked", -1,true];
};
_containerObject call ExileServer_system_simulationMonitor_addVehicle;
_containerObject

View File

@ -0,0 +1,19 @@
/**
* ExileServer_object_container_database_delete
*
* 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["_containerObject","_containerID"];
_containerObject = _this;
_containerID = _containerObject getVariable ["ExileDatabaseID", -1];
if !(_containerID isEqualTo -1) then
{
format ["deleteContainer:%1", _containerID] call ExileServer_system_database_query_fireAndForget;
};
true

View File

@ -0,0 +1,91 @@
/**
* ExileServer_object_container_database_insert
*
* 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["_containerObject","_position","_vectorDirection","_vectorUp","_territoryFlag","_territoryID","_data","_extDB2Message","_containerID","_cargoContainers"];
_containerObject = _this;
_position = getPosATL _containerObject;
_vectorDirection = vectorDir _containerObject;
_vectorUp = vectorUp _containerObject;
_territoryFlag = _containerObject call ExileClient_util_world_getTerritoryAtPosition;
_territoryID = if (isNull _territoryFlag) then { 'NULL' } else { _territoryFlag getVariable ["ExileDatabaseID", 'NULL']};
if !(ExileContainerCargo isEqualTo []) then
{
_data =
[
typeOf _containerObject,
_containerObject getVariable ["ExileOwnerUID", ""],
_position select 0,
_position select 1,
_position select 2,
_vectorDirection select 0,
_vectorDirection select 1,
_vectorDirection select 2,
_vectorUp select 0,
_vectorUp select 1,
_vectorUp select 2,
ExileContainerCargo select 0,
ExileContainerCargo select 1,
ExileContainerCargo select 2,
ExileContainerCargo select 3,
ExileContainerCargo select 4,
"0000",
_territoryID
];
} else
{
_data =
[
typeOf _containerObject,
_containerObject getVariable ["ExileOwnerUID", ""],
_position select 0,
_position select 1,
_position select 2,
_vectorDirection select 0,
_vectorDirection select 1,
_vectorDirection select 2,
_vectorUp select 0,
_vectorUp select 1,
_vectorUp select 2,
[],
[],
[],
[],
0,
"0000",
_territoryID
];
};
_extDB2Message = ["insertContainer", _data] call ExileServer_util_extDB2_createMessage;
_containerID = _extDB2Message call ExileServer_system_database_query_insertSingle;
if !(ExileContainerCargo isEqualTo []) then
{
[_containerObject, (_data select 11)] call ExileServer_util_fill_fillItems;
[_containerObject, (_data select 12)] call ExileServer_util_fill_fillMagazines;
[_containerObject, (_data select 13)] call ExileServer_util_fill_fillWeapons;
_cargoContainers = format ["loadContainerCargo:%1", _containerID] call ExileServer_system_database_query_selectSingle;
if !(_cargoContainers isEqualTo []) then
{
[_containerObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers;
};
ExileContainerCargo = [];
};
_containerObject setVariable ["ExileDatabaseID", _containerID];
_containerObject setVariable ["ExileIsPersistent", true];
_containerObject setVariable ["ExileIsContainer", true];
_containerObject setVariable ["ExileAccessCode","0000"];
_containerObject setVariable ["ExileTerritoryID", _territoryID];
_containerObject setVariable ["ExileMoney", parseNumber (_data select 15), true];
_containerObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; (_this select 0) call ExileServer_object_container_event_onMpKilled; }];
if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsLockable") isEqualTo 1)then
{
_containerObject setVariable ["ExileIsLocked",-1,true];
};
_containerID

View File

@ -0,0 +1,46 @@
/**
* ExileServer_object_container_database_load
*
* 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["_containerID","_data","_position","_vectorDirection","_vectorUp","_abandoned","_containerObject","_cargoContainers"];
_containerID = _this;
_data = format ["loadContainer:%1", _containerID] call ExileServer_system_database_query_selectSingle;
_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;
_containerObject = [(_data select 1), _position, 0] call ExileServer_object_container_createContainer;
_containerObject setVectorDirAndUp [_vectorDirection, _vectorUp];
_containerObject setVariable ["ExileDatabaseID", _containerID];
_containerObject setVariable ["ExileOwnerUID", (_data select 2),true];
_containerObject setVariable ["ExileAccessCode",(_data select 16)];
_containerObject setVariable ["ExileTerritoryID", (_data select 17)];
_containerObject setVariable ["ExileMoney", (_data select 20), true];
if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsLockable") isEqualTo 1)then
{
_containerObject setVariable ["ExileIsLocked",(_data select 3),true];
};
[_containerObject, (_data select 13)] call ExileServer_util_fill_fillItems;
[_containerObject, (_data select 14)] call ExileServer_util_fill_fillMagazines;
[_containerObject, (_data select 15)] call ExileServer_util_fill_fillWeapons;
_cargoContainers = format ["loadContainerCargo:%1", _containerID] call ExileServer_system_database_query_selectSingle;
if !(_cargoContainers isEqualTo []) then
{
[_containerObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers;
};
if !(_abandoned isEqualTo "") then
{
format ["ExileServer - Adding Container %1 to Abandonded Safes", _containerID] call ExileClient_util_log;
ExileAbandondedSafes pushBack _containerObject;
};
_containerObject enableSimulationGlobal false;
_containerObject call ExileServer_system_simulationMonitor_addVehicle;
_containerObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; (_this select 0) call ExileServer_object_container_event_onMpKilled; }];
_containerObject

View File

@ -0,0 +1,20 @@
/**
* ExileServer_object_container_database_setPin
*
* 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["_object","_newPin","_databaseID"];
_object = _this select 0;
_newPin = _this select 1;
_databaseID = _object getVariable ["ExileDatabaseID",-1];
if!(_databaseID isEqualTo -1)then
{
format ["containerSetPinCode:%1:%2",_newPin,_databaseID] call ExileServer_system_database_query_fireAndForget;
};
true

View File

@ -0,0 +1,46 @@
/**
* ExileServer_object_container_database_update
*
* 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["_containerObject","_containerID","_position","_vectorDirection","_vectorUp","_territoryFlag","_territoryID","_data","_extDB2Message"];
_containerObject= _this;
_containerID = _containerObject getVariable ["ExileDatabaseID", -1];
if (_containerID > -1) then
{
_position = getPosATL _containerObject;
_vectorDirection = vectorDir _containerObject;
_vectorUp = vectorUp _containerObject;
_territoryFlag = _containerObject call ExileClient_util_world_getTerritoryAtPosition;
_territoryID = if (isNull _territoryFlag) then { 'NULL' } else { _territoryFlag getVariable ["ExileDatabaseID", 'NULL']};
_containerObject setVariable ["ExileTerritoryID", _territoryID];
_data =
[
_containerObject getVariable ["ExileIsLocked",-1],
_position select 0,
_position select 1,
_position select 2,
_vectorDirection select 0,
_vectorDirection select 1,
_vectorDirection select 2,
_vectorUp select 0,
_vectorUp select 1,
_vectorUp select 2,
_containerObject call ExileServer_util_getItemCargo,
magazinesAmmoCargo _containerObject,
weaponsItemsCargo _containerObject,
_containerObject call ExileServer_util_getObjectContainerCargo,
_territoryID,
_containerObject getVariable ["ExileMoney", 0],
_containerID
];
_extDB2Message = ["updateContainer", _data] call ExileServer_util_extDB2_createMessage;
_extDB2Message call ExileServer_system_database_query_fireAndForget;
};
true

View File

@ -0,0 +1,15 @@
/**
* ExileServer_object_container_event_onMpKilled
*
* 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["_object"];
_object = _this;
_object call ExileServer_object_container_database_delete;
deleteVehicle _object;

View File

@ -0,0 +1,35 @@
/**
* ExileServer_object_container_network_packRequest
*
* 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["_sessionID","_parameters","_object","_pincode","_objectPinCode"];
_sessionID = _this select 0;
_parameters = _this select 1;
_object = objectFromNetId (_parameters select 0);
_pincode = _parameters select 1;
if!(getNumber(configFile >> "CfgVehicles" >> typeOf _object >> "exileIsLockable") isEqualTo 1)then
{
_object call ExileServer_object_container_packContainer;
[_sessionID,"systemChatRequest",["Container Packed!"]] call ExileServer_system_network_send_to;
}
else
{
_objectPinCode = _object getVariable ["ExileAccessCode","000000"];
if(_objectPinCode isEqualTo _pincode)then
{
_object call ExileServer_object_container_packContainer;
[_sessionID,"systemChatRequest",["Container Packed!"]] call ExileServer_system_network_send_to;
}
else
{
[_sessionID,"systemChatRequest",["Wrong PIN code! "]] call ExileServer_system_network_send_to;
};
};
true

View File

@ -0,0 +1,37 @@
/**
* ExileServer_object_container_packContainer
*
* 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["_object","_objectpos","_items","_magazines","_weapons","_containers","_popTabs","_typeof","_groundHolder","_popTabsObject","_filter","_kitMagazine"];
_object = _this;
_objectpos = getPosATL _object;
_items = _object call ExileServer_util_getItemCargo;
_magazines = magazinesAmmoCargo _object;
_weapons = weaponsItemsCargo _object;
_containers =_object call ExileServer_util_getObjectContainerCargo;
_popTabs = _object getVariable ["ExileMoney",0];
_typeof = typeOf _object;
deleteVehicle _object;
_object call ExileServer_object_container_database_delete;
_groundHolder = createVehicle ["GroundWeaponHolder",_objectpos, [], 0, "CAN_COLLIDE"];
_groundHolder setPosATL _objectpos;
if (_popTabs > 0 ) then
{
_popTabsObject = createVehicle ["Exile_PopTabs", _objectpos, [], 0, "CAN_COLLIDE"];
_popTabsObject setVariable ["ExileMoney", _popTabs, true];
};
_filter = ("getText(_x >> 'staticObject') == _typeof" configClasses(configFile >> "CfgConstruction")) select 0;
_kitMagazine = getText(_filter >> "kitMagazine");
_groundHolder addItemCargoGlobal [_kitMagazine,1];
[_groundHolder,_items] call ExileServer_util_fill_fillItems;
[_groundHolder,_magazines] call ExileServer_util_fill_fillMagazines;
[_groundHolder,_weapons] call ExileServer_util_fill_fillWeapons;
[_groundHolder,_containers] call ExileServer_util_fill_fillContainers;
true

View File

@ -0,0 +1,19 @@
/**
* ExileServer_object_flies_spawn
*
* 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["_deadEntity","_fliesSound","_fliesParticles"];
_deadEntity = _this;
_fliesSound = createSoundSource ["Exile_Sound_Flies", getPos _deadEntity, [], 0];
_fliesSound attachTo [_deadEntity, [0, 0, 0]];
_fliesParticles = createVehicle ["Exile_Effect_Flies", getPos _deadEntity, [], 0, "CAN_COLLIDE"];
_fliesParticles attachTo [_deadEntity, [0, 0, 0]];
_deadEntity setVariable ["ExileFliesSound", _fliesSound];
_deadEntity setVariable ["ExileFliesParticles", _fliesParticles];

View File

@ -0,0 +1,28 @@
/**
* ExileServer_object_floodLight_network_toggleFloodLightRequest
*
* 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["_sessionID","_parameters","_floodLightNetID","_damage","_floodLight","_player"];
_sessionID = _this select 0;
_parameters = _this select 1;
_floodLightNetID = _parameters select 0;
_damage = _parameters select 1;
_floodLight = objectFromNetId _floodLightNetID;
if (local _floodLight) then
{
_floodLight setHit ["light_1_hitpoint", _damage];
}
else
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
_floodLight setOwner (owner _player);
[_sessionID, "toggleFloodLightRequest", [_floodLightNetID, _damage]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,56 @@
/**
* ExileServer_object_handcuffs_network_breakFreeRequest
*
* 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["_sessionID","_victim","_hostageTakerNetID","_hostageTaker","_respect","_newScore"];
_sessionID = _this select 0;
try
{
_victim = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _victim) then
{
throw "Unknown player cannot break free!";
};
if !(alive _victim) then
{
throw "The dead cannot break free!";
};
if !(_victim getVariable ["ExileIsHandcuffed", false]) then
{
throw "Cannot break free if not handcuffed!";
};
if !(_victim call ExileClient_object_handcuffs_hasFreeItems) then
{
throw "Missing tools to break free!";
};
_hostageTakerNetID = _victim getVariable ["ExileHostageTakerNetID", ""];
_hostageTaker = objectFromNetId _hostageTakerNetID;
if !(isNull _hostageTaker) then
{
if ((_victim distance _hostageTaker) < 20) then
{
throw "Hostage taker is too close!";
};
};
_victim setVariable ["ExileIsHandcuffed", false, true];
_victim setVariable ["ExileHostageTakerNetID", nil];
_victim setVariable ["ExileHostageTakerUID", nil];
["switchMoveRequest", [netId _victim, "Acts_AidlPsitMstpSsurWnonDnon_out"]] call ExileServer_system_network_send_broadcast;
_respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "breakingFree");
[_victim, "breakFreeResponse", [str _respect]] call ExileServer_system_network_send_to;
_newScore = _victim getVariable ["ExileScore", 0];
_newScore = _newScore + _respect;
_victim setVariable ["ExileScore", _newScore];
format["setAccountScore:%1:%2", _newScore, getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget;
}
catch
{
_exception call ExileServer_util_log;
};

View File

@ -0,0 +1,62 @@
/**
* ExileServer_object_handcuffs_network_freeRequest
*
* 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["_sessionID","_parameters","_victimNetID","_player","_victim","_respect","_newScore"];
_sessionID = _this select 0;
_parameters = _this select 1;
_victimNetID = _parameters select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "Unknown player cannot free someone!";
};
if !(alive _player) then
{
throw "The dead cannot free others!";
};
_victim = objectFromNetID _victimNetID;
if (isNull _victim) then
{
throw "Cannot free unknown victim!";
};
if !(_victim getVariable ["ExileIsHandcuffed", false]) then
{
throw "Cannot free not-handcuffed ones!";
};
if !(_player call ExileClient_object_handcuffs_hasFreeItems) then
{
throw "Missing tools to break free!";
};
["switchMoveRequest", [netId _victim, "Acts_AidlPsitMstpSsurWnonDnon_out"]] call ExileServer_system_network_send_broadcast;
if ((getPlayerUID _player) isEqualTo (_victim getVariable ["ExileHostageTakerUID", ""])) then
{
_respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "releasedByHostageTaker");
}
else
{
_respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "releasedByHero");
};
[_victim, "freeRequest", [""]] call ExileServer_system_network_send_to;
[_player, "freeResponse", [str _respect]] call ExileServer_system_network_send_to;
_newScore = _player getVariable ["ExileScore", 0];
_newScore = _newScore + _respect;
_player setVariable ["ExileScore", _newScore];
format["setAccountScore:%1:%2", _newScore, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget;
_victim setVariable ["ExileIsHandcuffed", false, true];
_victim setVariable ["ExileHostageTakerNetID", nil];
_victim setVariable ["ExileHostageTakerUID", nil];
}
catch
{
_exception call ExileServer_util_log;
};

View File

@ -0,0 +1,71 @@
/**
* ExileServer_object_handcuffs_network_handcuffRequest
*
* 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["_sessionID","_parameters","_victimNetID","_hostageTaker","_victim","_respect","_newScore"];
_sessionID = _this select 0;
_parameters = _this select 1;
_victimNetID = _parameters select 0;
try
{
_hostageTaker = _sessionID call ExileServer_system_session_getPlayerObject;
_victim = objectFromNetID _victimNetID;
if (isNull _hostageTaker) then
{
throw "Unknown player cannot handcuff someone!";
};
if !(alive _hostageTaker) then
{
throw "The dead cannot handcuff others!";
};
if (isNull _victim) then
{
throw "Cannot handcuff unknown victim!";
};
if !(isPlayer _victim) then
{
throw "Cannot handcuff bots!";
};
if !(_victim isKindOf "Exile_Unit_Player") then
{
throw "Can only handcuff players!";
};
if !(alive _victim) then
{
throw "Dead people cannot be handcuffed!";
};
if !("Exile_Item_ZipTie" in (magazines _hostageTaker)) then
{
throw "Cannot handcuff others without handcuffs!";
};
if (_victim getVariable ["ExileIsHandcuffed", false]) then
{
throw "Cannot double handcuff someone!";
};
if ((_hostageTaker distance _victim) > 2) then
{
throw "No long distance bondage!";
};
_victim setVariable ["ExileIsHandcuffed", true, true];
_victim setVariable ["ExileHostageTakerNetID", netId _hostageTaker];
_victim setVariable ["ExileHostageTakerUID", getPlayerUID _hostageTaker];
["switchMoveRequest", [_victimNetID, "Acts_AidlPsitMstpSsurWnonDnon_loop"]] call ExileServer_system_network_send_broadcast;
[_victim, "handcuffRequest", [netId _hostageTaker]] call ExileServer_system_network_send_to;
_respect = getNumber (configFile >> "CfgSettings" >> "Respect" >> "Handcuffs" >> "trapping");
[_hostageTaker, "handcuffResponse", [str _respect]] call ExileServer_system_network_send_to;
_newScore = _hostageTaker getVariable ["ExileScore", 0];
_newScore = _newScore + _respect;
_hostageTaker setVariable ["ExileScore", _newScore];
format["setAccountScore:%1:%2", _newScore, getPlayerUID _hostageTaker] call ExileServer_system_database_query_fireAndForget;
}
catch
{
_exception call ExileServer_util_log;
};

View File

@ -0,0 +1,61 @@
/**
* ExileServer_object_lock_network_hotwireLockRequest
*
* 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["_sessionID","_parameters","_object","_player"];
_sessionID = _this select 0;
_parameters = _this select 1;
try
{
_object = objectFromNetId (_parameters select 0);
if (isNull _object) then
{
throw "Vehicle object is null.";
};
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "Player is null.";
};
if ((_player distance _object) > 10) then
{
throw "You are too far away.";
};
if !("Exile_Item_Knife" in (magazines _player)) then
{
throw "You do not have a knife.";
};
if (isNumber(configFile >> "CfgVehicles" >> typeOf _object >> "exileIsLockable")) then
{
_object setVariable ["ExileIsLocked", 0, true];
}
else
{
if (local _object) then
{
_object lock 0;
}
else
{
[owner _object, "hotwireLockRequest", [netId _object]] call ExileServer_system_network_send_to;
};
_object setVariable ["ExileIsLocked", 0];
_object call ExileServer_system_vehicleSaveQueue_addVehicle;
};
_object enableRopeAttach true;
_object setVariable ["ExileLastLockToggleAt", time];
_object setVariable ["ExileAccessDenied", false];
_object setVariable ["ExileAccessDeniedExpiresAt", 0];
[_sessionID, "toastRequest", ["SuccessTitleOnly", ["Vehicle hotwired!"]]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to hotwire!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,131 @@
/**
* ExileServer_object_lock_network_lockToggle
*
* 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["_sessionID","_paramaters","_object","_pincode","_state","_objectPinCode","_type","_accessDenied","_accessDenialExpiresAt","_numberOfFails"];
_sessionID = _this select 0;
_paramaters = _this select 1;
_object = objectFromNetId (_paramaters select 0);
_pincode = _paramaters select 1;
_state = _paramaters select 2;
_objectPinCode = _object getVariable ["ExileAccessCode","000000"];
_type = typeOf _object;
_accessDenied = false;
if (_object getVariable ["ExileAccessDenied", false]) then
{
_accessDenialExpiresAt = _object getVariable ["ExileAccessDeniedExpiresAt", 0];
if (time > _accessDenialExpiresAt) then
{
_object setVariable ["ExileAccessDenied", false];
_object setVariable ["ExileAccessDeniedExpiresAt", 0];
}
else
{
_accessDenied = true;
};
};
if (_accessDenied) then
{
[_sessionID,"lockResponse",["Access denied!", false, "", "", -1]] call ExileServer_system_network_send_to;
}
else
{
if((count _pincode) isEqualTo (count _objectPinCode))then
{
if(_pincode isEqualTo _objectPinCode)then
{
if!(_state)then
{
if(isNumber(configFile >> "CfgVehicles" >> _type >> "exileIsLockable"))then
{
_object setVariable ["ExileIsLocked",0,true];
}
else
{
if(local _object)then
{
_object lock 0;
}
else
{
[owner _object,"LockVehicleRequest",[netId _object,false]] call ExileServer_system_network_send_to;
};
_object setVariable ["ExileIsLocked",0];
};
if (_object isKindOf "Exile_Container_Safe") then
{
_object animate ['DoorRotation', 1];
};
[_sessionID,"lockResponse",["Unlocked!", true , netId _object , _objectPinCode, 0]] call ExileServer_system_network_send_to;
_object enableRopeAttach true;
}
else
{
if(isNumber(configFile >> "CfgVehicles" >> _type >> "exileIsLockable"))then
{
_object setVariable ["ExileIsLocked",-1,true];
}
else
{
if(local _object)then
{
_object lock 2;
}
else
{
[owner _object,"LockVehicleRequest",[netId _object,true]] call ExileServer_system_network_send_to;
};
_object setVariable ["ExileIsLocked",-1];
};
if (_object isKindOf "Exile_Container_Safe") then
{
_object animate ['DoorRotation', 0];
};
[_sessionID,"lockResponse",["Locked!",true, netId _object, _objectPinCode, 2]] call ExileServer_system_network_send_to;
_object enableRopeAttach false;
};
_object setVariable ["ExileLastLockToggleAt", time];
_object setVariable ["ExileAccessDenied", false];
_object setVariable ["ExileAccessDeniedExpiresAt", 0];
_object call ExileServer_system_vehicleSaveQueue_addVehicle;
}
else
{
if (_object call ExileClient_util_world_isInTraderZone) then
{
[_sessionID,"lockResponse",["Wrong PIN!", false, "", "", -1]] call ExileServer_system_network_send_to;
}
else
{
_numberOfFails = _object getVariable ["ExileNumberOfFailedLocks", 0];
_numberOfFails = _numberOfFails + 1;
_object setVariable ["ExileNumberOfFailedLocks", _numberOfFails];
switch (_numberOfFails) do
{
case 1:
{
[_sessionID,"lockResponse",["Wrong PIN! Two tries remaining.", false, "", "", -1]] call ExileServer_system_network_send_to;
};
case 2:
{
[_sessionID,"lockResponse",["Wrong PIN! One try remaining.", false, "", "", -1]] call ExileServer_system_network_send_to;
};
default
{
[_sessionID,"lockResponse",["Wrong PIN! Access denied for five minutes.", false, "", "", -1]] call ExileServer_system_network_send_to;
_object setVariable ["ExileAccessDenied", true];
_object setVariable ["ExileAccessDeniedExpiresAt", time + (5 * 60)];
};
};
};
};
};
};
true

View File

@ -0,0 +1,55 @@
/**
* ExileServer_object_lock_network_scanCodeLockRequest
*
* 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["_sessionID","_parameters","_object","_player","_lastToggleAt","_pinCode","_signature"];
_sessionID = _this select 0;
_parameters = _this select 1;
try
{
_object = objectFromNetId (_parameters select 0);
if (isNull _object) then
{
throw "NOPE";
};
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "NOPE";
};
if ((_player distance _object) > 5) then
{
throw "NOPE";
};
if !("Exile_Item_ThermalScannerPro" in (magazines _player)) then
{
throw "NOPE";
};
if (_object call ExileClient_util_world_isInTraderZone) then
{
throw "NOPE";
};
_lastToggleAt = _object getVariable ["ExileLastLockToggleAt", -1];
if (_lastToggleAt isEqualTo -1) then
{
throw "NOPE";
};
if ((time - _lastToggleAt) > (15 * 60)) then
{
throw "NOPE";
};
_pinCode = _object getVariable ["ExileAccessCode", "0000"];
_signature = _pinCode select [1, 3];
throw _signature;
}
catch
{
[_sessionID, "scanCodeLockResponse", [_exception]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,29 @@
/**
* ExileServer_object_lock_network_setPin
*
* 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["_sessionID","_parameters","_object","_pincode","_newPinCode","_objectPinCode"];
_sessionID = _this select 0;
_parameters = _this select 1;
_object = objectFromNetId (_parameters select 0);
_pincode = _parameters select 1;
_newPinCode = _parameters select 2;
_objectPinCode = _object getVariable ["ExileAccessCode", "000000"];
if(_pincode isEqualTo _objectPinCode)then
{
_object setVariable ["ExileAccessCode",_newPinCode];
[_sessionID, "setPinResponse", [["SuccessTitleOnly", ["PIN changed successfully!"]], netId _object, _newPinCode]] call ExileServer_system_network_send_to;
[_object,_newPinCode] call ExileServer_object_container_database_setpin;
}
else
{
[_sessionID, "setPinResponse", [["ErrorTitleAndText", ["Wrong PIN!", "Please try again."]], "", ""]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,149 @@
/**
* ExileServer_object_player_createBambi
*
* 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["_sessionID","_requestingPlayer","_spawnLocationMarkerName","_bambiPlayer","_accountData","_direction","_position","_spawnAreaPosition","_spawnAreaRadius","_clanID","_clanData","_clanGroup","_player","_devFriendlyMode","_devs","_parachuteNetID","_spawnType","_parachuteObject"];
_sessionID = _this select 0;
_requestingPlayer = _this select 1;
_spawnLocationMarkerName = _this select 2;
_bambiPlayer = _this select 3;
_accountData = _this select 4;
_direction = random 360;
if ((count ExileSpawnZoneMarkerPositions) isEqualTo 0) then
{
_position = call ExileClient_util_world_findCoastPosition;
if ((toLower worldName) isEqualTo "namalsk") then
{
while {(_position distance2D [76.4239, 107.141, 0]) < 100} do
{
_position = call ExileClient_util_world_findCoastPosition;
};
};
}
else
{
_spawnAreaPosition = getMarkerPos _spawnLocationMarkerName;
_spawnAreaRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius");
_position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
while {surfaceIsWater _position} do
{
_position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
};
};
_name = name _requestingPlayer;
_clanID = (_accountData select 3);
if !((typeName _clanID) isEqualTo "SCALAR") then
{
_clanID = -1;
_clanData = [];
}
else
{
_clanData = missionNamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]];
if(isNull (_clanData select 5))then
{
_clanGroup = createGroup independent;
_clanData set [5,_clanGroup];
_clanGroup setGroupIdGlobal [_clanData select 0];
missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData];
}
else
{
_clanGroup = (_clanData select 5);
};
[_player] joinSilent _clanGroup;
};
_bambiPlayer setPosATL [_position select 0,_position select 1,0];
_bambiPlayer disableAI "FSM";
_bambiPlayer disableAI "MOVE";
_bambiPlayer disableAI "AUTOTARGET";
_bambiPlayer disableAI "TARGET";
_bambiPlayer disableAI "CHECKVISIBLE";
_bambiPlayer setDir _direction;
_bambiPlayer setName _name;
_bambiPlayer setVariable ["ExileMoney", 0, true];
_bambiPlayer setVariable ["ExileScore", (_accountData select 0)];
_bambiPlayer setVariable ["ExileKills", (_accountData select 1)];
_bambiPlayer setVariable ["ExileDeaths", (_accountData select 2)];
_bambiPlayer setVariable ["ExileClanID", _clanID];
_bambiPlayer setVariable ["ExileClanData", _clanData];
_bambiPlayer setVariable ["ExileHunger", 100];
_bambiPlayer setVariable ["ExileThirst", 100];
_bambiPlayer setVariable ["ExileTemperature", 37];
_bambiPlayer setVariable ["ExileWetness", 0];
_bambiPlayer setVariable ["ExileAlcohol", 0];
_bambiPlayer setVariable ["ExileName", _name];
_bambiPlayer setVariable ["ExileOwnerUID", getPlayerUID _requestingPlayer];
_bambiPlayer setVariable ["ExileIsBambi", true];
_bambiPlayer setVariable ["ExileXM8IsOnline", false, true];
_bambiPlayer setVariable ["ExileLocker", (_accountData select 4), true];
_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode");
if (_devFriendlyMode isEqualTo 1) then
{
_devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs");
{
if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith
{
if((name _requestingPlayer) isEqualTo (_x select 1))then
{
_bambiPlayer setVariable ["ExileMoney", 500000, true];
_bambiPlayer setVariable ["ExileScore", 100000];
};
};
}
forEach _devs;
};
_parachuteNetID = "";
if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteSpawning")) isEqualTo 1) then
{
_position set [2, getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteDropHeight")];
if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "haloJump")) isEqualTo 1) then
{
_bambiPlayer addBackpackGlobal "B_Parachute";
_bambiPlayer setPosATL _position;
_spawnType = 2;
}
else
{
_parachuteObject = createVehicle ["Steerable_Parachute_F", _position, [], 0, "CAN_COLLIDE"];
_parachuteObject setDir _direction;
_parachuteObject setPosATL _position;
_parachuteObject enableSimulationGlobal true;
_parachuteNetID = netId _parachuteObject;
_spawnType = 1;
};
}
else
{
_spawnType = 0;
};
_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}];
_bambiPlayer call ExileServer_object_player_database_insert;
_bambiPlayer call ExileServer_object_player_database_update;
[
_sessionID,
"createPlayerResponse",
[
_bambiPlayer,
_parachuteNetID,
str (_accountData select 0),
(_accountData select 1),
(_accountData select 2),
100,
100,
0,
(getNumber (configFile >> "CfgSettings" >> "BambiSettings" >> "protectionDuration")) * 60,
_clanData,
_spawnType
]
]
call ExileServer_system_network_send_to;
[_sessionID, _bambiPlayer] call ExileServer_system_session_update;
true

View File

@ -0,0 +1,16 @@
/**
* ExileServer_object_player_database_insert
*
* 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["_player","_playerID"];
_player = _this;
_playerID = format["createPlayer:%1:%2", _player getVariable ["ExileOwnerUID", "SomethingWentWrong"], _player getVariable ["ExileName", "SomethingWentWrong"]] call ExileServer_system_database_query_insertSingle;
_player setVariable ["ExileDatabaseID", _playerID];
_playerID

View File

@ -0,0 +1,246 @@
/**
* ExileServer_object_player_database_load
*
* 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["_data","_oldPlayerObject","_playerUID","_sessionID","_position","_direction","_player","_clanID","_clanName","_clanData","_clanGroup","_devFriendlyMode","_devs","_requestingPlayer","_bambiPlayer","_headgear","_goggles","_binocular","_primaryWeapon","_handgunWeapon","_secondaryWeapon","_currentWeapon","_uniform","_vest","_backpack","_uniformContainer","_vestContainer","_backpackContainer","_assignedItems"];
_data = _this select 0;
_oldPlayerObject = _this select 1;
_playerUID = _this select 2;
_sessionID = _this select 3;
_name = name _oldPlayerObject;
_position = [_data select 11, _data select 12, _data select 13];
_direction = _data select 10;
_player = (createGroup independent) createUnit ["Exile_Unit_Player", _position, [], 0, "CAN_COLLIDE"];
_player setDir _direction;
_player setPosATL _position;
_player disableAI "FSM";
_player disableAI "MOVE";
_player disableAI "AUTOTARGET";
_player disableAI "TARGET";
_player disableAI "CHECKVISIBLE";
_clanID = (_data select 42);
_clanName = (_data select 43);
if !((typeName _clanID) isEqualTo "SCALAR") then
{
_clanID = -1;
_clanData = [];
}
else
{
_clanData = missionnamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]];
if(isNull (_clanData select 5))then
{
_clanGroup = createGroup independent;
_clanData set [5,_clanGroup];
_clanGroup setGroupIdGlobal [_clanData select 0];
missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData];
}
else
{
_clanGroup = (_clanData select 5);
};
[_player] joinSilent _clanGroup;
};
_player setDamage (_data select 3);
_player setName _name;
_player setVariable ["ExileMoney", (_data select 38), true];
_player setVariable ["ExileScore", (_data select 39)];
_player setVariable ["ExileKills", (_data select 40)];
_player setVariable ["ExileDeaths", (_data select 41)];
_player setVariable ["ExileClanID", _clanID];
_player setVariable ["ExileClanData", _clanData];
_player setVariable ["ExileName", _name];
_player setVariable ["ExileOwnerUID", _playerUID];
_player setVariable ["ExileDatabaseID", _data select 0];
_player setVariable ["ExileHunger", _data select 4];
_player setVariable ["ExileThirst", _data select 5];
_player setVariable ["ExileAlcohol", _data select 6];
_player setVariable ["ExileTemperature", _data select 44];
_player setVariable ["ExileWetness", _data select 45];
_player setVariable ["ExileIsBambi", false];
_player setVariable ["ExileXM8IsOnline", false, true];
_player setOxygenRemaining (_data select 7);
_player setBleedingRemaining (_data select 8);
_player setVariable ["ExileLocker", (_data select 46), true];
[_player, _data select 9] call ExileClient_util_player_applyHitPointMap;
_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode");
if (_devFriendlyMode isEqualTo 1) then
{
_devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs");
{
if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith
{
if((name _requestingPlayer) isEqualTo (_x select 1))then
{
_bambiPlayer setVariable ["ExileMoney", 500000, true];
_bambiPlayer setVariable ["ExileScore", 100000];
};
};
}
forEach _devs;
};
_player call ExileClient_util_playerCargo_clear;
_headgear = _data select 23;
if (_headgear != "") then
{
_player addHeadgear _headgear;
};
_goggles = _data select 20;
if (_goggles != "") then
{
_player addGoggles _goggles;
};
_binocular = _data select 24;
if (_binocular != "") then
{
_player addWeaponGlobal _binocular;
};
_primaryWeapon = _data select 26;
if (_primaryWeapon != "") then
{
_player addWeaponGlobal _primaryWeapon;
removeAllPrimaryWeaponItems _player;
{
if (_x != "") then
{
_player addPrimaryWeaponItem _x;
};
}
forEach (_data select 27);
};
_handgunWeapon = _data select 22;
if (_handgunWeapon != "") then
{
_player addWeaponGlobal _handgunWeapon;
removeAllHandgunItems _player;
{
if (_x != "") then
{
_player addHandgunItem _x;
};
}
forEach (_data select 21);
};
_secondaryWeapon = _data select 28;
if (_secondaryWeapon != "") then
{
_player addWeaponGlobal _secondaryWeapon;
{
if (_x != "") then
{
_player addSecondaryWeaponItem _x;
};
}
forEach (_data select 29);
};
_currentWeapon = _data select 19;
if (_currentWeapon != "") then
{
_player selectWeapon _currentWeapon;
};
{
_player addWeaponItem [_x select 0, [_x select 1, _x select 2, _x select 3]];
}
forEach (_data select 25);
_uniform = _data select 30;
_vest = _data select 34;
_backpack = _data select 15;
if (_uniform != "") then
{
_player forceAddUniform _uniform;
};
if (_vest != "") then
{
_player addVest _vest;
};
if (_backpack != "") then
{
_player addBackpackGlobal _backpack;
};
_uniformContainer = uniformContainer _player;
if !(isNil "_uniformContainer") then
{
{
_uniformContainer addWeaponCargoGlobal _x;
}
forEach (_data select 33);
{
_uniformContainer addMagazineAmmoCargo [_x select 0, 1, _x select 1];
}
forEach (_data select 32);
{
_uniformContainer addItemCargoGlobal _x;
}
forEach (_data select 31);
};
_vestContainer = vestContainer _player;
if !(isNil "_vestContainer") then
{
{
_vestContainer addWeaponCargoGlobal _x;
}
forEach (_data select 37);
{
_vestContainer addMagazineAmmoCargo [_x select 0, 1, _x select 1];
}
forEach (_data select 36);
{
_vestContainer addItemCargoGlobal _x;
}
forEach (_data select 35);
};
_backpackContainer = backpackContainer _player;
if !(isNil "_backpackContainer") then
{
{
_backpackContainer addWeaponCargoGlobal _x;
}
forEach (_data select 18);
{
_backpackContainer addMagazineAmmoCargo [_x select 0, 1, _x select 1];
}
forEach (_data select 17);
{
_backpackContainer addItemCargoGlobal _x;
}
forEach (_data select 16);
};
_assignedItems = _data select 14;
if !(_assignedItems isEqualTo []) then
{
{
_player linkItem _x;
}
forEach _assignedItems;
};
_player addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}];
if (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "thermalVision") isEqualTo 0) then
{
_player addEventHandler ["WeaponAssembled", {(_this select 1) disableTIEquipment true;}];
};
[
_sessionID,
"loadPlayerResponse",
[
(netId _player),
str (_player getVariable ["ExileScore", 0]),
(_player getVariable ["ExileKills", 0]),
(_player getVariable ["ExileDeaths", 0]),
(_player getVariable ["ExileHunger", 100]),
(_player getVariable ["ExileThirst", 100]),
(_player getVariable ["ExileAlcohol", 0]),
(_player getVariable ["ExileClanData", []]),
(_player getVariable ["ExileTemperature", 0]),
(_player getVariable ["ExileWetness", 0])
]
]
call ExileServer_system_network_send_to;
[_sessionID, _player] call ExileServer_system_session_update;
true

View File

@ -0,0 +1,60 @@
/**
* ExileServer_object_player_database_update
*
* 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["_player","_playerID","_playerPos","_data","_extDB2Message"];
_player = _this;
_playerID = _player getVariable["ExileDatabaseID", -1];
_playerPos = getPosATL _player;
_data =
[
_player getVariable ["ExileName",""],
damage _player,
_player getVariable ["ExileHunger", 100],
_player getVariable ["ExileThirst", 100],
_player getVariable ["ExileAlcohol", 0],
getOxygenRemaining _player,
getBleedingRemaining _player,
_player call ExileClient_util_player_getHitPointMap,
getDir _player,
_playerPos select 0,
_playerPos select 1,
_playerPos select 2,
assignedItems _player,
backpack _player,
(getItemCargo backpackContainer _player) call ExileClient_util_cargo_getMap,
(backpackContainer _player) call ExileClient_util_cargo_getMagazineMap,
(getWeaponCargo backpackContainer _player) call ExileClient_util_cargo_getMap,
currentWeapon _player,
goggles _player,
handgunItems _player,
handgunWeapon _player,
headgear _player,
binocular _player,
_player call ExileClient_util_inventory_getLoadedMagazinesMap,
primaryWeapon _player,
primaryWeaponItems _player,
secondaryWeapon _player,
secondaryWeaponItems _player,
uniform _player,
(getItemCargo uniformContainer _player) call ExileClient_util_cargo_getMap,
(uniformContainer _player) call ExileClient_util_cargo_getMagazineMap,
(getWeaponCargo uniformContainer _player) call ExileClient_util_cargo_getMap,
vest _player,
(getItemCargo vestContainer _player) call ExileClient_util_cargo_getMap,
(vestContainer _player) call ExileClient_util_cargo_getMagazineMap,
(getWeaponCargo vestContainer _player) call ExileClient_util_cargo_getMap,
_player getVariable ["ExileTemperature", 0],
_player getVariable ["ExileWetness", 0],
_playerID
];
_extDB2Message = ["updatePlayer", _data] call ExileServer_util_extDB2_createMessage;
_extDB2Message call ExileServer_system_database_query_fireAndForget;
true

View File

@ -0,0 +1,194 @@
/**
* ExileServer_object_player_event_onMpKilled
*
* 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["_victim","_killer","_countDeath","_countKill","_killSummary","_killingPlayer","_killType","_oldVictimRespect","_newVictimRespect","_oldKillerRespect","_newKillerRespect","_systemChat","_modifyVictimRespect","_respectLoss","_perks","_minRespectTransfer","_respectTransfer","_perkNames","_killerStatsNeedUpdate","_newKillerFrags","_victimStatsNeedUpdate","_newVictimDeaths","_victimPosition"];
_victim = _this select 0;
_killer = _this select 1;
if (!isServer || hasInterface || isNull _victim) exitWith {};
_victim setVariable ["ExileDiedAt", time];
if !(isPlayer _victim) exitWith {};
_victim setVariable ["ExileIsDead", true];
_victim setVariable ["ExileName", name _victim, true];
_countDeath = false;
_countKill = false;
_killSummary = [];
_killingPlayer = _killer call ExileServer_util_getFragKiller;
_killType = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragType;
_oldVictimRespect = _victim getVariable ["ExileScore", 0];
_newVictimRespect = _oldVictimRespect;
_oldKillerRespect = 0;
if !(isNull _killingPlayer) then
{
_oldKillerRespect = _killingPlayer getVariable ["ExileScore", 0];
};
_newKillerRespect = _oldKillerRespect;
switch (_killType) do
{
default
{
_countDeath = true;
_systemChat = format ["%1 died for an unknown reason!", name _victim];
_newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "unlucky")));
};
case 1:
{
_countDeath = true;
_modifyVictimRespect = true;
_systemChat = format ["%1 commited suicide!", name _victim];
_newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "suicide")));
};
case 2:
{
_countDeath = true;
_countKill = false;
_systemChat = format ["%1 died while playing Russian Roulette!", name _victim];
_newVictimRespect = _oldVictimRespect;
_victim call ExileServer_system_russianRoulette_event_onPlayerDied;
};
case 3:
{
_countDeath = true;
_countKill = false;
_systemChat = format ["%1 crashed to death!", name _victim];
_newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "crash")));
};
case 4:
{
_countDeath = true;
_countKill = false;
_systemChat = format ["%1 was killed by an NPC!", name _victim];
_newVictimRespect = _oldVictimRespect - round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "npc")));
};
case 5:
{
_countDeath = false;
_countKill = false;
_systemChat = format ["%1 was team-killed by %2!", name _victim, name _killingPlayer];
_respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "friendyFire")));
_newKillerRespect = _oldKillerRespect - _respectLoss;
_killSummary pushBack ["FRIENDLY FIRE", -1 * _respectLoss];
};
case 6:
{
_countDeath = false;
_countKill = false;
_systemChat = format ["%1 was killed by %2! (BAMBI SLAYER)", name _victim, name _killingPlayer];
_respectLoss = round ((abs _oldKillerRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "bambiKill")));
_newKillerRespect = _oldKillerRespect - _respectLoss;
_killSummary pushBack ["BAMBI SLAYER", -1 * _respectLoss];
};
case 7:
{
_countDeath = true;
_countKill = true;
_perks = [_victim, _killer, _killingPlayer] call ExileServer_util_getFragPerks;
_minRespectTransfer = getNumber (configFile >> "CfgSettings" >> "Respect" >> "minRespectTransfer");
_respectTransfer = round ((abs _oldVictimRespect) / 100 * (getNumber (configFile >> "CfgSettings" >> "Respect" >> "Percentages" >> "frag")));
if (_respectTransfer < _minRespectTransfer) then
{
_respectTransfer = _minRespectTransfer;
};
_newVictimRespect = _oldVictimRespect - _respectTransfer;
_newKillerRespect = _oldKillerRespect + _respectTransfer;
_killSummary pushBack ["ENEMY FRAGGED", _respectTransfer];
if (_perks isEqualTo []) then
{
_systemChat = format ["%1 was killed by %2!", name _victim, name _killingPlayer];
}
else
{
_perkNames = [];
{
_perkNames pushBack (_x select 0);
_killSummary pushBack _x;
_newKillerRespect = _newKillerRespect + (_x select 1);
}
forEach _perks;
_systemChat = format ["%1 was killed by %2! (%3)", name _victim, name _killingPlayer, _perkNames joinString ", "];
};
};
};
if !(isNull _killingPlayer) then
{
if !(_killSummary isEqualTo []) then
{
[_killingPlayer, "showFragRequest", [_killSummary]] call ExileServer_system_network_send_to;
};
};
if !(isNull _killingPlayer) then
{
_killerStatsNeedUpdate = false;
if (_countKill) then
{
_newKillerFrags = _killingPlayer getVariable ["ExileKills", 0];
_newKillerFrags = _newKillerFrags + 1;
_killerStatsNeedUpdate = true;
_killingPlayer setVariable ["ExileKills", _newKillerFrags];
format["addAccountKill:%1", getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget;
};
if !(_newKillerRespect isEqualTo _oldKillerRespect) then
{
_killingPlayer setVariable ["ExileScore", _newKillerRespect];
_killerStatsNeedUpdate = true;
format["setAccountScore:%1:%2", _newKillerRespect, getPlayerUID _killingPlayer] call ExileServer_system_database_query_fireAndForget;
};
if (_killerStatsNeedUpdate) then
{
_killingPlayer call ExileServer_object_player_sendStatsUpdate;
};
};
_victimStatsNeedUpdate = false;
if (_countDeath) then
{
_newVictimDeaths = _victim getVariable ["ExileDeaths", 0];
_newVictimDeaths = _newVictimDeaths + 1;
_victim setVariable ["ExileDeaths", _newVictimDeaths];
_victimStatsNeedUpdate = true;
format["addAccountDeath:%1", getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget;
};
if !(_newVictimRespect isEqualTo _oldVictimRespect) then
{
_victim setVariable ["ExileScore", _newVictimRespect];
_victimStatsNeedUpdate = true;
format["setAccountScore:%1:%2", _newVictimRespect, getPlayerUID _victim] call ExileServer_system_database_query_fireAndForget;
};
if (_victimStatsNeedUpdate) then
{
_victim call ExileServer_object_player_sendStatsUpdate;
};
if ((vehicle _victim) isEqualTo _victim) then
{
if !(underwater _victim) then
{
if !(_victim call ExileClient_util_world_isInTraderZone) then
{
_victim call ExileServer_object_flies_spawn;
};
};
};
if !(_systemChat isEqualTo "") then
{
if ((getNumber (configFile >> "CfgSettings" >> "KillFeed" >> "showKillFeed")) isEqualTo 1) then
{
["systemChatRequest", [_systemChat]] call ExileServer_system_network_send_broadcast;
};
};
if !(_systemChat isEqualTo "") then
{
if ((getNumber (configFile >> "CfgSettings" >> "Logging" >> "deathLogging")) isEqualTo 1) then
{
"extDB3" callExtension format["1:DEATH:%1", _systemChat];
};
};
_victimPosition = getPos _victim;
format["insertPlayerHistory:%1:%2:%3:%4:%5", getPlayerUID _victim, name _victim, _victimPosition select 0, _victimPosition select 1, _victimPosition select 2] call ExileServer_system_database_query_fireAndForget;
format["deletePlayer:%1", _victim getVariable ["ExileDatabaseId", -1]] call ExileServer_system_database_query_fireAndForget;
true

View File

@ -0,0 +1,24 @@
/**
* ExileServer_object_player_network_beginTakeAllRequest
*
* 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["_sessionID","_parameters","_objectNetID","_object"];
_sessionID = _this select 0;
_parameters = _this select 1;
_objectNetID = _parameters select 0;
_object = objectFromNetId _objectNetID;
if !(isNull _object) then
{
if ((_object getVariable ["ExileTakeAllLock", ""]) isEqualTo "") then
{
_object setVariable ["ExileTakeAllLock", _sessionID];
[_sessionID, "beginTakeAllResponse", [_objectNetID]] call ExileServer_system_network_send_to;
};
};

View File

@ -0,0 +1,15 @@
/**
* ExileServer_object_player_network_connectionTest
*
* 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["_sessionID"];
_sessionID = _this select 0;
[_sessionID, "connectionTest", [true]] call ExileServer_system_network_send_to;
true

View File

@ -0,0 +1,48 @@
/**
* ExileServer_object_player_network_createPlayerRequest
*
* 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["_sessionID","_parameters","_requestingPlayer","_spawnLocationMarkerName","_playerUID","_accountData","_bambiPlayer","_cargoType"];
_sessionID = _this select 0;
_parameters = _this select 1;
_requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject;
try
{
if (isNull _requestingPlayer) then
{
throw format ["Session %1 requested a bambi character, but doesn't have a player object. Hacker or Monday?", _sessionID];
};
_spawnLocationMarkerName = _parameters select 0;
_playerUID = getPlayerUID _requestingPlayer;
if(_playerUID isEqualTo "")then
{
throw format ["Player: '%1' has no player UID. Arma/Steam sucks!.",name _requestingPlayer];
};
_accountData = format["getAccountStats:%1", _playerUID] call ExileServer_system_database_query_selectSingle;
_bambiPlayer = (createGroup independent) createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"];
removeHeadgear _bambiPlayer;
{
_cargoType = _x call ExileClient_util_cargo_getType;
switch (_cargoType) do
{
case 1: { _bambiPlayer addItem _x; };
case 2: { _bambiPlayer addWeaponGlobal _x; };
case 3: { _bambiPlayer addBackpackGlobal _x; };
case 4: { _bambiPlayer linkItem _x; };
default { _bambiPlayer addItem _x; };
};
}
forEach getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "loadOut");
[_sessionID, _requestingPlayer, _spawnLocationMarkerName, _bambiPlayer, _accountData] call ExileServer_object_player_createBambi;
}
catch
{
_exception call ExileServer_util_log;
};

View File

@ -0,0 +1,15 @@
/**
* ExileServer_object_player_network_endBambiStateRequest
*
* 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["_sessionID","_playerObject"];
_sessionID = _this select 0;
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
_playerObject setVariable["ExileIsBambi", false];

View File

@ -0,0 +1,23 @@
/**
* ExileServer_object_player_network_endTakeAllRequest
*
* 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["_sessionID","_parameters","_objectNetID","_object"];
_sessionID = _this select 0;
_parameters = _this select 1;
_objectNetID = _parameters select 0;
_object = objectFromNetId _objectNetID;
if !(isNull _object) then
{
if ((_object getVariable ["ExileTakeAllLock", ""]) isEqualTo _sessionID) then
{
_object setVariable ["ExileTakeAllLock", nil];
};
};

View File

@ -0,0 +1,39 @@
/**
* ExileServer_object_player_network_hasPlayerRequest
*
* 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["_sessionID","_player","_hasAlivePlayer"];
_sessionID = _this select 0;
_player = _sessionID call ExileServer_system_session_getPlayerObject;
try
{
format ["Dispatching hasPlayerRequest for session '%1'...", _sessionID] call ExileServer_util_log;
if (isNull _player) then
{
throw "Player object is null!";
};
_uid = getPlayerUID _player;
if (isNil "_uid") then
{
throw "getPlayerUID returned nil!";
};
if (_uid isEqualTo "") then
{
throw "getPlayerUID returned an empty string!";
};
_hasAlivePlayer = format["hasAlivePlayer:%1", _uid] call ExileServer_system_database_query_selectSingleField;
[_sessionID, "hasPlayerResponse", [_hasAlivePlayer]] call ExileServer_system_network_send_to;
}
catch
{
"hasPlayerRequest failed!" call ExileServer_util_log;
_exception call ExileServer_util_log;
};
true

View File

@ -0,0 +1,50 @@
/**
* ExileServer_object_player_network_hideBodyRequest
*
* 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["_sessionId","_parameters","_corpse","_player","_sessionID"];
_sessionId = _this select 0;
_parameters = _this select 1;
_corpse = _parameters select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "player NULL";
};
if(isNull _corpse)then
{
throw "corpse NULL";
};
if !('Exile_Melee_Shovel' isEqualTo (currentWeapon _player)) then
{
throw "You need a shovel to do that.";
};
if !((typeOf _corpse) isEqualTo "Exile_Unit_Player") then
{
throw "You can only bury players.";
};
if !(_corpse getVariable ["ExileIsDead", false]) then
{
throw "You can only bury the dead.";
};
if (_player getVariable ["ExileIsDead", false]) then
{
throw "You are too dead for this.";
};
deleteVehicle _corpse;
[_sessionID, "toastRequest", ["SuccessTitleOnly", ["Corpse hidden!"]]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to bury corpse!", _exception]]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,37 @@
/**
* ExileServer_object_player_network_loadPlayerRequest
*
* 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["_sessionID","_playerObject","_playerUID","_playerData"];
_sessionID = _this select 0;
try
{
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _playerObject) then
{
throw "Player object is null!";
};
_playerUID = getPlayerUID _playerObject;
if (isNil "_playerUID") then
{
throw "Player UID is nil!";
};
if (_playerUID isEqualTo "") then
{
throw "Player UID is an empty string!";
};
_playerData = format["loadPlayer:%1", _playerUID] call ExileServer_system_database_query_selectSingle;
[_playerData, _playerObject, _playerUID, _sessionID] call ExileServer_object_player_database_load;
}
catch
{
"loadPlayerRequest failed!" call ExileServer_util_log;
_exception call ExileServer_util_log;
};

View File

@ -0,0 +1,19 @@
/**
* ExileServer_object_player_network_resetPlayerRequest
*
* 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["_sessionID","_player"];
_sessionID = _this select 0;
_player = _sessionID call ExileServer_system_getPlayerObject;
if (!isNull _player) then
{
deleteVehicle _player;
};
true

View File

@ -0,0 +1,33 @@
/**
* ExileServer_object_player_network_savePlayerRequest
*
* 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["_sessionID","_parameters","_hunger","_thirst","_alcohol","_temperature","_wetness","_player"];
_sessionID = _this select 0;
_parameters = _this select 1;
_hunger = _parameters select 0;
_thirst = _parameters select 1;
_alcohol = _parameters select 2;
_temperature = _parameters select 3;
_wetness = _parameters select 4;
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (!isNull _player) then
{
_player setVariable["ExileHunger", _hunger];
_player setVariable["ExileThirst", _thirst];
_player setVariable["ExileAlcohol", _alcohol];
_player setVariable["ExileTemperature", _temperature];
_player setVariable["ExileWetness", _wetness];
if !(_player in ExileSystemPlayerSaveASYNC) then
{
ExileSystemPlayerSaveASYNC pushBack _player;
};
};
true

View File

@ -0,0 +1,15 @@
/**
* ExileServer_object_player_network_setPlayerMoneyRequest
*
* 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["_sessionId","_parameters"];
_sessionId = _this select 0;
_parameters = _this select 1;
// TODO: Honey pot, ban the idiot

View File

@ -0,0 +1,21 @@
/**
* ExileServer_object_player_network_switchMoveRequest
*
* 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["_sessionId","_parameters","_playerNetID","_move","_player"];
_sessionId = _this select 0;
_parameters = _this select 1;
_playerNetID = _parameters select 0;
_move = _parameters select 1;
_player = objectFromNetId _playerNetID;
if !(isNull _player) then
{
["switchMoveRequest", _parameters, _sessionId] call ExileServer_system_network_send_broadcast;
};

View File

@ -0,0 +1,20 @@
/**
* ExileServer_object_player_network_updatePlayerIncapacitatedRequest
*
* 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["_sessionID","_parameters","_isIncapacitated","_player"];
_sessionID = _this select 0;
_parameters = _this select 1;
_isIncapacitated = _parameters select 0;
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if !(isNull _player) then
{
_player setVariable ["ExilePlayerIsIncapacitated", _isIncapacitated];
};

View File

@ -0,0 +1,21 @@
/**
* ExileServer_object_player_sendStatsUpdate
*
* 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/.
*/
[
_this,
"updateStatsRequest",
[
str (_this getVariable ["ExileScore", 0]),
_this getVariable ["ExileKills", 0],
_this getVariable ["ExileDeaths", 0]
]
]
call ExileServer_system_network_send_to;

View File

@ -0,0 +1,70 @@
/**
* ExileServer_object_shippingContainer_network_smashShippingContainerRequest
*
* 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["_sessionId","_parameters","_shippingContainer","_player","_shippingContainerVolume","_damagePerHit","_newDamage","_shippingContainerPosition","_numberOfItems","_weaponHolder"];
_sessionId = _this select 0;
_parameters = _this select 1;
_shippingContainer = _parameters select 0;
try
{
if (isNull _shippingContainer) then
{
throw format ["Cannot smash unknown shipping container!"];
};
if !(alive _shippingContainer) then
{
throw "Cannot smash destroyed shipping container!";
};
if !([_shippingContainer, "ShippingContainerSource"] call ExileClient_util_model_isInteraction) then
{
throw "Can only smash shipping containers!";
};
_player = _sessionId call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "Unknown players cannot smash shipping containers!";
};
if !(alive _player) then
{
throw "The dead cannot smash shipping containers!";
};
if ((_player distance _shippingContainer) > 30) then
{
throw "No long distance shipping container smashing! Nope!";
};
_shippingContainerVolume = _shippingContainer call ExileClient_util_model_getBoundingBoxVolume;
if (_shippingContainerVolume < 1) then
{
_shippingContainerVolume = 1;
};
_damagePerHit = (1 / (_shippingContainerVolume * 0.5)) min 0.2;
_newDamage = ((damage _shippingContainer) + _damagePerHit) min 1;
if (_newDamage isEqualTo 1) then
{
_shippingContainerPosition = getPosATL _shippingContainer;
_shippingContainerPosition set [2, 0];
_shippingContainer setDamage 999;
_numberOfItems = (ceil (_shippingContainerVolume / 10)) max 1;
format ["Spawning %1 junk metal at %2", _numberOfItems, _shippingContainerPosition] call ExileServer_util_log;
_weaponHolder = createVehicle ["GroundWeaponHolder", _shippingContainerPosition, [], 0, "CAN_COLLIDE"];
_weaponHolder setPosATL _shippingContainerPosition;
_weaponHolder addMagazineCargoGlobal ["Exile_Item_JunkMetal", _numberOfItems];
}
else
{
_shippingContainer setDamage _newDamage;
};
}
catch
{
_exception call ExileServer_util_log;
};
true

View File

@ -0,0 +1,73 @@
/**
* ExileServer_object_supplyBox_network_attachSupplyBoxRequest
*
* 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["_sessionId","_parameters","_boxNetId","_box","_boxConfig","_vehicleTypes","_vehicles","_vehicle","_attachedObjects","_vehicleConfig","_cargoIndizes","_crew"];
_sessionId = _this select 0;
_parameters = _this select 1;
_boxNetId = _parameters select 0;
try
{
_box = objectFromNetId _boxNetId;
if (isNull _box) then
{
throw "Invalid box.";
};
if !(isNull (attachedTo _box)) then
{
throw "Box already mounted.";
};
_boxConfig = missionConfigFile >> "CfgVehicleTransport" >> typeOf _box;
_vehicleTypes = getArray (_boxConfig >> "vehicles");
_vehicles = nearestObjects [_box, _vehicleTypes, 15];
if (_vehicles isEqualTo []) then
{
throw "No transport vehicle nearby.";
};
_vehicle = _vehicles select 0;
_attachedObjects = attachedObjects _vehicle;
{
if ((typeOf _x) isEqualTo (typeOf _box)) then
{
throw "Vehicle already transports a supply box.";
};
}
forEach _attachedObjects;
_vehicleConfig = -1;
{
if ((typeOf _vehicle) isKindOf _x) exitWith
{
_vehicleConfig = _boxConfig >> _x;
};
}
forEach _vehicleTypes;
if (_vehicleConfig isEqualTo -1) then
{
throw "Broken CfgVehicleTransport :(";
};
_cargoIndizes = getArray (_vehicleConfig >> "cargoIndizes");
_crew = fullCrew _vehicle;
{
if ((_x select 2) in _cargoIndizes) then
{
throw "Passengers are blocking cargo area."
};
}
forEach _crew;
{
_vehicle lockCargo [_x, true];
}
forEach _cargoIndizes;
_box attachTo [_vehicle, getArray (_vehicleConfig >> "attachPosition")];
throw "Supply box mounted!"
}
catch
{
};

View File

@ -0,0 +1,48 @@
/**
* ExileServer_object_supplyBox_network_detachSupplyBoxRequest
*
* 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["_sessionId","_parameters","_boxNetId","_box","_vehicle","_boxConfig","_vehicleConfig","_modelSpacePosition","_worldSpacePosition"];
_sessionId = _this select 0;
_parameters = _this select 1;
_boxNetId = _parameters select 0;
try
{
_box = objectFromNetId _boxNetId;
if (isNull _box) then
{
throw "Invalid box.";
};
_vehicle = attachedTo _box;
if (isNull _vehicle) then
{
throw "Box not mounted.";
};
_boxConfig = missionConfigFile >> "CfgVehicleTransport" >> typeOf _box;
_vehicleConfig = -1;
{
if (_vehicle isKindOf _x) exitWith
{
_vehicleConfig = _boxConfig >> _x;
};
}
forEach getArray (_boxConfig >> "vehicles");
_modelSpacePosition = getArray (_vehicleConfig >> "detachPosition");
_modelSpacePosition pushBack 0;
_worldSpacePosition = _vehicle modelToWorld _modelSpacePosition;
_worldSpacePosition set [2, 0];
detach _box;
_box setPosATL _worldSpacePosition;
_box setVelocity [0, 0, 0];
throw "Crate unmounted!";
}
catch
{
};

View File

@ -0,0 +1,50 @@
/**
* ExileServer_object_supplyBox_network_installSupplyBoxRequest
*
* 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["_sessionId","_parameters","_boxNetId","_box","_territory","_playerObject","_sessionID","_access","_containerID"];
_sessionId = _this select 0;
_parameters = _this select 1;
_boxNetId = _parameters select 0;
try
{
_box = objectFromNetId _boxNetId;
if (isNull _box) then
{
throw "Box null";
};
if !((typeOf _box) isEqualTo "Exile_Container_SupplyBox") then
{
throw "Fuck off";
};
if!((_box getVariable ["ExileDatabaseID", -1]) isEqualTo -1)then
{
throw "Container already installed.";
};
_territory = _box call ExileClient_util_world_getTerritoryAtPosition;
if (isNull _territory) then
{
throw "Only allowed to install in a territory.";
};
_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
_access = [_territory,getPlayerUID _playerObject] call ExileClient_util_territory_getAccessLevel;
if (_access select 0 isEqualTo 0) then
{
throw "Not allowed to install in this territory.";
};
_box setVariable ["ExileOwnerUID", getPlayerUID _playerObject,true];
_containerID = _box call ExileServer_object_container_database_insert;
[_sessionID, "toastRequest", ["SuccessTitleOnly", ["Supply box installed!"]]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to install!", _exception]]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,74 @@
/**
* ExileServer_object_tree_network_chopTreeRequest
*
* 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["_sessionId","_parameters","_treeNetId","_tree","_isTree","_player","_treeHeight","_newDamage","_treePosition","_spawnRadius","_weaponHolders","_weaponHolder","_weaponHolderPosition"];
_sessionId = _this select 0;
_parameters = _this select 1;
_treeNetId = _parameters select 0;
try
{
_tree = objectFromNetId _treeNetId;
if (isNull _tree) then
{
throw format ["Cannot chop unknown tree! %1", _treeNetId];
};
if !(alive _tree) then
{
throw "Cannot chop already chopped tree!";
};
_isTree = [_tree, "WoodSource"] call ExileClient_util_model_isInteraction;
if !(_isTree) then
{
throw "Can only chop down trees, you twat!";
};
_player = _sessionId call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "Unknown players cannot chop trees!";
};
if !(alive _player) then
{
throw "The dead cannot chop down trees!";
};
if ((_player distance _tree) > 30) then
{
throw "No long distance tree chopping! Nope!";
};
_treeHeight = _tree call ExileClient_util_model_getHeight;
_treeHeight = _treeHeight max 1;
_newDamage = ((damage _tree) + (1 / (floor _treeHeight) )) min 1;
_tree setDamage _newDamage;
if (_newDamage isEqualTo 1) then
{
_tree setDamage 999;
};
_treePosition = getPosATL _tree;
_treePosition set[2, 0];
_spawnRadius = 3;
_weaponHolders = nearestObjects[_treePosition, ["GroundWeaponHolder"], _spawnRadius];
_weaponHolder = objNull;
if (_weaponHolders isEqualTo []) then
{
_weaponHolderPosition = getPosATL _player;
_weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"];
_weaponHolder setPosATL _weaponHolderPosition;
}
else
{
_weaponHolder = _weaponHolders select 0;
};
_weaponHolder addMagazineCargoGlobal ["Exile_Item_WoodLog", 1];
}
catch
{
_exception call ExileServer_util_log;
};
true

View File

@ -0,0 +1,64 @@
/**
* ExileServer_object_vehicle_carefulCreateVehicle
*
* 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["_vehicleClassName","_position","_direction","_usePositionATL","_temporaryPositionInOuterSpace","_vehicleObject"];
_vehicleClassName = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_temporaryPositionInOuterSpace =
[
(_position select 0) - 250 + (random 500),
(_position select 1) - 250 + (random 500),
1000 + (random 1000)
];
_vehicleObject = createVehicle [_vehicleClassName, _temporaryPositionInOuterSpace, [], 0, "CAN_COLLIDE"];
_vehicleObject allowDamage false;
_vehicleObject removeAllEventHandlers "HandleDamage";
_vehicleObject addEventHandler["HandleDamage", {false}];
_vehicleObject setVelocity [0, 0, 0];
if ((typeName _direction) isEqualTo "ARRAY") then
{
_vehicleObject setVectorDirAndUp _direction;
}
else
{
_vehicleObject setDir _direction;
};
if (_usePositionATL) then
{
_vehicleObject setPosATL _position;
}
else
{
_vehicleObject setPosASL _position;
};
_vehicleObject setVelocity [0, 0, 0];
_vehicleObject allowDamage true;
_vehicleObject removeAllEventHandlers "HandleDamage";
_vehicleObject setDamage 0;
clearBackpackCargoGlobal _vehicleObject;
clearItemCargoGlobal _vehicleObject;
clearMagazineCargoGlobal _vehicleObject;
clearWeaponCargoGlobal _vehicleObject;
if (_vehicleClassName isKindOf "I_UGV_01_F") then
{
createVehicleCrew _vehicleObject;
};
if (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "nightVision") isEqualTo 0) then
{
_vehicleObject disableNVGEquipment true;
};
if (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "thermalVision") isEqualTo 0) then
{
_vehicleObject disableTIEquipment true;
};
_vehicleObject

View File

@ -0,0 +1,22 @@
/**
* ExileServer_object_vehicle_createNonPersistentVehicle
*
* 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["_className","_position","_direction","_usePositionATL","_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", false];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

View File

@ -0,0 +1,25 @@
/**
* ExileServer_object_vehicle_createPersistentVehicle
*
* 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["_className","_position","_direction","_usePositionATL","_pinCode","_vehicleObject"];
_className = _this select 0;
_position = _this select 1;
_direction = _this select 2;
_usePositionATL = _this select 3;
_pinCode = _this select 4;
_vehicleObject = [_className, _position, _direction, _usePositionATL] call ExileServer_object_vehicle_carefulCreateVehicle;
_vehicleObject setVariable ["ExileIsPersistent", true];
_vehicleObject setVariable ["ExileAccessCode", _pinCode];
_vehicleObject addEventHandler ["GetOut", {_this call ExileServer_object_vehicle_event_onGetOut}];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
_vehicleObject

View File

@ -0,0 +1,19 @@
/**
* ExileServer_object_vehicle_database_delete
*
* 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["_vehicleObject","_vehicleID"];
_vehicleObject = _this;
_vehicleID = _vehicleObject getVariable ["ExileDatabaseID", -1];
if (_vehicleID > -1) then
{
format ["deleteVehicle:%1", _vehicleID] call ExileServer_system_database_query_fireAndForget;
};
true

View File

@ -0,0 +1,37 @@
/**
* ExileServer_object_vehicle_database_insert
*
* 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["_vehicleObject","_position","_vectorDirection","_vectorUp","_data","_extDB2Message","_vehicleID"];
_vehicleObject = _this;
_position = getPosATL _vehicleObject;
_vectorDirection = vectorDir _vehicleObject;
_vectorUp = vectorUp _vehicleObject;
_data =
[
typeOf _vehicleObject,
_vehicleObject getVariable ["ExileOwnerUID", ""],
locked _vehicleObject,
_position select 0,
_position select 1,
_position select 2,
_vectorDirection select 0,
_vectorDirection select 1,
_vectorDirection select 2,
_vectorUp select 0,
_vectorUp select 1,
_vectorUp select 2,
_vehicleObject getVariable ["ExileAccessCode",""]
];
_extDB2Message = ["insertVehicle", _data] call ExileServer_util_extDB2_createMessage;
_vehicleID = _extDB2Message call ExileServer_system_database_query_insertSingle;
_vehicleObject setVariable["ExileDatabaseID", _vehicleID];
_vehicleObject setVariable["ExileIsPersistent", true];
_vehicleID

View File

@ -0,0 +1,83 @@
/**
* ExileServer_object_vehicle_database_load
*
* 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["_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];
_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;
_vehicleObject = [(_data select 1), _position, [_vectorDirection, _vectorUp], true,_pinCode] call ExileServer_object_vehicle_createPersistentVehicle;
_vehicleObject setVariable ["ExileDatabaseID", _vehicleID];
_vehicleObject setVariable ["ExileOwnerUID", (_data select 3)];
_vehicleObject setVariable ["ExileMoney", (_data select 23), true];
_lock = (_data select 4);
_unlockInSafeZonesAfterRestart = (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "unlockInSafeZonesAfterRestart")) isEqualTo 1;
_isLocked = (_lock isEqualTo -1);
if (_isLocked) then
{
if (_unlockInSafeZonesAfterRestart) then
{
if (_position call ExileClient_util_world_isInTraderZone) then
{
_isLocked = false;
};
};
};
if (_isLocked) then
{
_vehicleObject setVariable ["ExileIsLocked", -1];
_vehicleObject lock 2;
_vehicleObject enableRopeAttach false;
}
else
{
_vehicleObject setVariable ["ExileIsLocked", 0];
_vehicleObject lock 0;
_vehicleObject enableRopeAttach true;
};
_vehicleObject setFuel (_data select 5);
_vehicleObject setDamage (_data select 6);
_hitpoints = _data select 7;
if ((typeName _hitpoints) isEqualTo "ARRAY") then
{
{
_vehicleObject setHitPointDamage [_x select 0, _x select 1];
}
forEach _hitpoints;
};
[_vehicleObject, (_data select 17)] call ExileServer_util_fill_fillItems;
[_vehicleObject, (_data select 18)] call ExileServer_util_fill_fillMagazines;
[_vehicleObject, (_data select 19)] call ExileServer_util_fill_fillWeapons;
_cargoContainers = format ["loadVehicleContainer:%1", _vehicleID] call ExileServer_system_database_query_selectSingle;
if ((typeName _cargoContainers) isEqualTo "ARRAY") then
{
if !(_cargoContainers isEqualTo []) then
{
[_vehicleObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers;
};
};
if !(_texture isEqualTo "") then
{
{
_vehicleObject setObjectTextureGlobal [_forEachIndex, _texture select _forEachIndex];
}
forEach _texture;
};
_vehicleObject enableSimulationGlobal false;
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
if (_vehicleObject call ExileClient_util_world_isInTraderZone) then
{
_vehicleObject allowDamage false;
};
_vehicleObject

View File

@ -0,0 +1,20 @@
/**
* ExileServer_object_vehicle_database_resetCode
*
* 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["_vehicle","_newPin","_databaseID"];
_vehicle = _this select 0;
_newPin = _this select 1;
_databaseID = _vehicle getVariable ["ExileDatabaseID",-1];
if!(_databaseID isEqualTo -1)then
{
format ["vehicleSetPinCode:%1:%2",_newPin,_databaseID] call ExileServer_system_database_query_fireAndForget;
};
true

View File

@ -0,0 +1,54 @@
/**
* ExileServer_object_vehicle_database_update
*
* 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["_vehicleObject","_vehicleID","_position","_vectorDirection","_vectorUp","_availableHitpoints","_vehicleHitpoints","_data","_extDB2Message"];
_vehicleObject = _this;
_vehicleID = _vehicleObject getVariable ["ExileDatabaseID", -1];
if (_vehicleID > -1) then
{
_position = getPosATL _vehicleObject;
_vectorDirection = vectorDir _vehicleObject;
_vectorUp = vectorUp _vehicleObject;
_availableHitpoints = getAllHitPointsDamage _vehicleObject;
_vehicleHitpoints = [];
if!(_availableHitpoints isEqualTo [])then
{
{
_vehicleHitpoints pushBack [_x ,_vehicleObject getHitPointDamage _x];
}
forEach (_availableHitpoints select 0);
};
_data =
[
_vehicleObject getVariable ["ExileIsLocked",-1],
fuel _vehicleObject,
damage _vehicleObject,
_vehicleHitpoints,
_position select 0,
_position select 1,
_position select 2,
_vectorDirection select 0,
_vectorDirection select 1,
_vectorDirection select 2,
_vectorUp select 0,
_vectorUp select 1,
_vectorUp select 2,
_vehicleObject call ExileServer_util_getItemCargo,
magazinesAmmoCargo _vehicleObject,
weaponsItemsCargo _vehicleObject,
_vehicleObject call ExileServer_util_getObjectContainerCargo,
_vehicleObject getVariable ["ExileMoney", 0],
_vehicleID
];
_extDB2Message = ["updateVehicle", _data] call ExileServer_util_extDB2_createMessage;
_extDB2Message call ExileServer_system_database_query_fireAndForget;
};
true

View File

@ -0,0 +1,18 @@
/**
* ExileServer_object_vehicle_event_onDamaged
*
* 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["_vehicleObject"];
_vehicleObject = _this select 0;
if (_vehicleObject getVariable ["ExileIsPersistent", false]) then
{
_vehicleObject call ExileServer_system_vehicleSaveQueue_addVehicle;
};
true

View File

@ -0,0 +1,18 @@
/**
* ExileServer_object_vehicle_event_onGetIn
*
* 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["_vehicleObject"];
_vehicleObject = _this select 0;
if !(simulationEnabled _vehicleObject) then
{
_vehicleObject enableSimulationGlobal true;
};
true

View File

@ -0,0 +1,18 @@
/**
* ExileServer_object_vehicle_event_onGetOut
*
* 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["_vehicleObject"];
_vehicleObject = _this select 0;
if (_vehicleObject getVariable ["ExileIsPersistent", false]) then
{
_vehicleObject call ExileServer_system_vehicleSaveQueue_addVehicle;
};
true

View File

@ -0,0 +1,17 @@
/**
* ExileServer_object_vehicle_event_onMPKilled
*
* 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["_vehicleObject"];
if !(isServer) exitWith {true};
_vehicleObject = _this select 0;
_vehicleObject call ExileServer_object_vehicle_remove;
_vehicleObject setVariable ["ExileDiedAt", time];
true

View File

@ -0,0 +1,45 @@
/**
* ExileServer_object_vehicle_network_flipVehRequest
*
* 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["_sessionID","_parameters","_vehicleID","_vehicle","_player","_pos"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicleID = _parameters select 0;
_vehicle = objectFromNetId _vehicleID;
_player = _sessionID call ExileServer_system_session_getPlayerObject;
try
{
if (_vehicle distance _player > 7) then
{
throw "Player to far";
};
if !((crew _vehicle) isEqualTo []) then
{
throw "Vehicle not empty";
};
if (local _vehicle) then
{
_pos = getPosATL _vehicle;
_pos set [2,(_pos select 2) + 0.1];
_vehicle setPosATL _pos;
_vehicle setVectorUp [0, 0, 1];
}
else
{
_vehicle setOwner (owner _player);
[_sessionID,"flipVehRequest",[_vehicleID]] call ExileServer_system_network_send_to;
};
}
catch
{
format["FlipVehicleRequest: %1", _exception] call ExileServer_util_log;
};
true

View File

@ -0,0 +1,12 @@
/**
* ExileServer_object_vehicle_network_lockVehicleRequest
*
* 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/.
*/
true

View File

@ -0,0 +1,45 @@
/**
* ExileServer_object_vehicle_network_pushVehicleRequest
*
* 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["_sessionID","_parameters","_vehicleID","_vehicle","_direction","_magnitude","_callerID","_caller","_actualCaller"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicleID = _parameters select 0;
_vehicle = objectFromNetId _vehicleID;
_direction = _parameters select 1;
_magnitude = _parameters select 2;
_callerID = _parameters select 3;
_caller = objectFromNetId _caller;
_actualCaller = _sessionID call ExileServer_system_session_getPlayerObject;
try
{
if!(_caller isEqualTo _actualCaller)then
{
throw format ["Caller Sppofing: %1 tryied to spoof %2!",_actualCaller, _caller];
};
if(_magnitude > 15)then
{
throw format ["To high magnitude(%1) by %2",_magnitude, _caller];
};
if(local _vehicle)then
{
[_vehicle,_direction,_magnitude,_caller] call ExileClient_util_vehicle_push;
}
else
{
_vehicle setOwner (owner _caller);
[_sessionID,"pushVehicleRequest",[netId _vehicle,_direction,_magnitude,netId _caller]] call ExileServer_system_network_send_to;
};
}
catch
{
format["PushVehicleRequest: %1", _exception] call ExileServer_util_log;
};

View File

@ -0,0 +1,48 @@
/**
* ExileServer_object_vehicle_network_rekeyVehicleDialogRequest
*
* 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["_sessionID","_parameters","_vehicle","_rekeyCost","_player","_vehiclePinCode","_playerMoney","_responseCode"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicle = objectFromNetId (_parameters select 0);
_rekeyCost = _parameters select 1;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "Invalid player.";
};
if !(alive _player) then
{
throw "Dead player.";
};
_vehiclePinCode = _vehicle getVariable ["ExileAccessCode","000000"];
if (_vehiclePinCode isEqualTo "000000") then
{
throw "Non-persistent vehicle."
};
_playerMoney = _player getVariable ["ExileMoney", 0];
if (_rekeyCost > _playerMoney) then
{
throw "Player does not have enough money.";
};
_responseCode = "Rekey successful";
_playerMoney = _playerMoney - _rekeyCost;
_player setVariable ["ExileMoney", _playerMoney, true];
format["setPlayerMoney:%1:%2", _playerMoney, _player getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget;
[_sessionID,"rekeyVehicleDialogResponse",[_responseCode, netId _vehicle,_rekeyCost]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID,"rekeyVehicleDialogResponse",[_exception,"",0]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,32 @@
/**
* ExileServer_object_vehicle_network_rekeyVehicleRequest
*
* 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["_sessionID","_parameters","_vehicle","_newPinCode","_alphabet","_forbiddenCharacter"];
_sessionID = _this select 0;
_parameters = _this select 1;
try
{
_vehicle = objectFromNetId (_parameters select 0);
_newPinCode = _parameters select 1;
_alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet");
_forbiddenCharacter = [_newPinCode, _alphabet] call ExileClient_util_string_containsForbiddenCharacter;
if !(_forbiddenCharacter isEqualTo -1) then
{
throw format ["Fuuck you!", _forbiddenCharacter];
};
_vehicle setVariable ["ExileAccessCode", _newPinCode];
[_sessionID, "resetCodeResponse", [["SuccessTitleOnly", ["PIN changed successfully!"]], netId _vehicle,_newPinCode]] call ExileServer_system_network_send_to;
[_vehicle, _newPinCode] call ExileServer_object_vehicle_database_resetCode;
}
catch
{
};
true

View File

@ -0,0 +1,34 @@
/**
* ExileServer_object_vehicle_network_resetCodeDialogRequest
*
* 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["_sessionID","_parameters","_vehicle","_player","_responseCode"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicle = objectFromNetId (_parameters select 0);
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "Invalid player.";
};
if !(alive _player) then
{
throw "Dead player.";
};
_responseCode = "Reset Code";
[_sessionID,"resetCodeDialogResponse",[_responseCode, netId _vehicle]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID,"resetCodeDialogResponse",[_exception,""]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,39 @@
/**
* ExileServer_object_vehicle_network_resetCodeRequest
*
* 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["_sessionID","_parameters","_vehicle","_pincode","_newPinCode","_alphabet","_forbiddenCharacter","_vehiclePinCode"];
_sessionID = _this select 0;
_parameters = _this select 1;
try
{
_vehicle = objectFromNetId (_parameters select 0);
_pincode = _parameters select 1;
_newPinCode = _parameters select 2;
_alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet");
_forbiddenCharacter = [_newPinCode, _alphabet] call ExileClient_util_string_containsForbiddenCharacter;
if !(_forbiddenCharacter isEqualTo -1) then
{
throw format ["Fuuck you!", _forbiddenCharacter];
};
_vehiclePinCode = _vehicle getVariable ["ExileAccessCode","000000"];
if(_pincode isEqualTo _vehiclePinCode)then
{
_vehicle setVariable ["ExileAccessCode",_newPinCode];
[_sessionID, "resetCodeResponse", [["SuccessTitleOnly", ["PIN changed successfully!"]], netId _vehicle,_newPinCode]] call ExileServer_system_network_send_to;
[_vehicle, _newPinCode] call ExileServer_object_vehicle_database_resetCode;
}
else
{
[_sessionID, "resetCodeResponse", [["ErrorTitleOnly", ["Wrong PIN!"]],"",""]] call ExileServer_system_network_send_to;
};
}
catch{};
true

View File

@ -0,0 +1,28 @@
/**
* ExileServer_object_vehicle_network_rotateVehicleRequest
*
* 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["_sessionID","_parameters","_vehicleID","_vehicle","_rotation","_player"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicleID = _parameters select 0;
_vehicle = objectFromNetId _vehicleID;
_rotation = _parameters select 1;
if(local _vehicle)then
{
[_vehicle,_rotation] call ExileClient_object_vehicle_rotate;
}
else
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
_vehicle setOwner (owner _player);
[_sessionID,"rotateVehicleRequest",[_vehicleID,_rotation]] call ExileServer_system_network_send_to;
};
true

View File

@ -0,0 +1,32 @@
/**
* ExileServer_object_vehicle_network_setFuelRequest
*
* 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["_sessionID","_parameters","_vehicleID","_ammount","_vehicle","_crew","_sessionIDcrew"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicleID = _parameters select 0;
_ammount = _parameters select 1;
_vehicle = objectFromNetId _vehicleID;
if(local _vehicle)then
{
[_vehicle,_ammount] call ExileClient_util_fuel_setFuel;
}
else
{
_crew = crew _vehicle;
if!(_crew isEqualTo [])then
{
_crew = _crew select 0;
_sessionIDcrew = _crew getVariable ["ExileSessionID", ""];
[_sessionIDcrew, "setFuelRequest", [_vehicleID,_ammount]] call ExileServer_system_network_send_to;
};
};
true

View File

@ -0,0 +1,11 @@
/**
* ExileServer_object_vehicle_network_unlockVehicleRequest
*
* 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/.
*/

View File

@ -0,0 +1,20 @@
/**
* ExileServer_object_vehicle_remove
*
* 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["_vehicleObject"];
_vehicleObject = _this;
if (_vehicleObject getVariable ["ExileIsPersistent", false]) then
{
_vehicleObject call ExileServer_object_vehicle_database_delete;
_vehicleObject call ExileServer_system_vehicleSaveQueue_removeVehicle;
};
_vehicleObject call ExileServer_system_simulationMonitor_removeVehicle;
true

View File

@ -0,0 +1,40 @@
/**
* ExileServer_system_breaching_network_breachingCancel
*
* 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["_sessionID","_parameters","_charge","_player","_constructionObject"];
_sessionID = _this select 0;
_parameters = _this select 1;
_charge = _parameters select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist! :)";
};
if(isNull _charge)then
{
throw "Charge is null";
};
_constructionObject = _player getVariable ["ExileBreachingObject",objNull];
if(isNull _constructionObject)then
{
throw "Breaching object is null";
};
_constructionObject setVariable ["ExileBreaching",false,true];
_player setVariable ["ExileBreachingObject",objNull];
_player setVariable ["ExileBreachingCharge",objNull];
deleteVehicle _charge;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,58 @@
/**
* ExileServer_system_breaching_network_breachingPlaceRequest
*
* 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["_sessionID","_parameters","_position","_vectorUP","_charge","_player","_constructionObject","_explosiveClassName"];
_sessionID = _this select 0;
_parameters = _this select 1;
_position = _parameters select 0;
_vectorUP = _parameters select 1;
_charge = _parameters select 2;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist! :)";
};
_constructionObject = _player getVariable ["ExileBreachingObject",objNull];
if(isNull _constructionObject)then
{
throw "Construction object null";
};
_explosiveClassName = _constructionObject call ExileClient_util_breaching_getBreachingMag;
if(_explosiveClassName isEqualTo -1)then
{
throw "Invalid placing object";
};
if((_explosiveClassName select 0) isEqualTo 0)then
{
if!((_explosiveClassName select 1) in (magazines _player))then
{
throw (format ["You dont have: %1",_explosiveClassName select 1]);
};
}
else
{
if!((backpack _player) isEqualTo (_explosiveClassName select 1))then
{
throw (format ["You dont have: %1",_explosiveClassName select 1]);
};
};
if(isNull _charge)then
{
throw "charge null";
};
[_sessionID,"breachingPlaceResponse",[_charge]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,73 @@
/**
* ExileServer_system_breaching_network_breachingStart
*
* 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["_sessionID","_parameters","_constructionObject","_player","_explosiveClassName","_breachingClassname","_territory","_charge","_Veh"];
_sessionID = _this select 0;
_parameters = _this select 1;
_constructionObject = _parameters select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist! :)";
};
_explosiveClassName = _constructionObject call ExileClient_util_breaching_getBreachingMag;
if(_explosiveClassName isEqualTo -1)then
{
throw "Invalid placing object";
};
_breachingClassname = (_explosiveClassName select 1);
if((_explosiveClassName select 0) isEqualTo 0)then
{
if!(_breachingClassname in (magazines _player))then
{
throw (format ["You dont have: %1",_breachingClassname]);
};
}
else
{
if!((backpack _player) isEqualTo (_breachingClassname))then
{
throw (format ["You dont have: %1",_breachingClassname]);
};
};
if((_constructionObject getVariable ["ExileDatabaseID",-1]) isEqualTo -1)then
{
throw "Not a persistant?";
};
if(_constructionObject getVariable ["ExileBreachingActive",false])then
{
throw "You can only place one charge at a time.";
};
_territory = _player call ExileClient_util_world_getTerritoryAtPosition;
if(isNull _territory)then
{
throw "Invalid Territory?";
};
if((getPlayerUID _player) in (_territory getVariable ["ExileTerritoryBuildRights",[]]))then
{
throw "You cannot breach through your own walls!";
};
_charge = createVehicle [((_explosiveClassName select 2) + "_Veh"), [0,0,0], [], 0, "CAN_COLLIDE"];
_player setVariable ["ExileBreachingObject",_constructionObject];
_player setVariable ["ExileBreachingCharge",_charge];
_constructionObject setVariable ["ExileBreaching",true,true];
if!(_charge setOwner (owner _player))then
{
[_charge, _player] call ExileServer_system_swapOwnershipQueue_add;
};
[_sessionID,"breachingResponse",[_charge,_constructionObject]] call ExileServer_system_network_send_to;
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,36 @@
/**
* ExileServer_system_breaching_network_chargePlanted
*
* 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["_sessionID","_player","_constructionObject","_charge"];
_sessionID = _this select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if (isNull _player) then
{
throw "You do not exist! :)";
};
_constructionObject = _player getVariable ["ExileBreachingObject",objNull];
if (isNull _constructionObject) then
{
throw "Construction null!";
};
_charge = _player getVariable ["ExileBreachingCharge",objNull];
if (isNull _charge) then
{
throw "Charge null!";
};
ExileServerBreachingCharges pushBack [_charge, _constructionObject, getPlayerUID _player];
}
catch
{
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to breach!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,86 @@
/**
* ExileServer_system_breaching_network_detonateAllCharges
*
* 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["_sessionID","_player","_chargesDetonated","_playerUID","_charge","_constructionObject","_owner","_explosiveClassName","_chargePosition","_ammo","_weaponHolderPosition","_weaponHolder","_territory","_serverTime","_currentDamage","_newDamage"];
_sessionID = _this select 0;
_player = _sessionID call ExileServer_system_session_getPlayerObject;
_chargesDetonated = 0;
if !(isNull _player) then
{
_playerUID = getPlayerUID _player;
if !(ExileServerBreachingCharges isEqualTo []) then
{
{
_charge = _x select 0;
_constructionObject = _x select 1;
_owner = _x select 2;
if (_owner isEqualTo _playerUID) then
{
if !(isNull _constructionObject) then
{
if !(isNull _charge) then
{
_explosiveClassName = getText (configFile >> "CfgVehicles" >> (typeOf _charge) >> "ammo");
_chargePosition = getPosATL _charge;
deleteVehicle _charge;
_ammo = createVehicle [_explosiveClassName, _chargePosition, [], 0, "CAN_COLLIDE"];
_ammo setPosATL _chargePosition;
_ammo setDamage 1;
if (_explosiveClassName isEqualTo "Exile_Ammo_BreachingCharge_BigMomma") then
{
_weaponHolderPosition =
[
_chargePosition select 0,
_chargePosition select 1,
(getPosATL _constructionObject) select 2
];
_weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"];
_weaponHolder setPosATL _weaponHolderPosition;
_weaponHolder addMagazineCargoGlobal ["Exile_Item_MobilePhone", 1];
};
_territory = _constructionObject call ExileClient_util_world_getTerritoryAtPosition;
_serverTime = time;
if(_serverTime > ((_territory getVariable ["ExileXM8MobileNotifiedTime",-1800]) + 1800))then
{
_territory call ExileServer_system_xm8_sendBaseRaid;
_territory setVariable ["ExileXM8MobileNotifiedTime", _serverTime];
};
_currentDamage = _constructionObject getVariable ["ExileConstructionDamage", 0];
_newDamage = _currentDamage + 1;
if (_newDamage > 2) then
{
_constructionObject call ExileServer_object_construction_database_delete;
deleteVehicle _constructionObject;
}
else
{
_constructionObject setVariable ["ExileConstructionDamage", _newDamage, true];
_constructionObject setVariable ["ExileBreaching", false, true];
(format [
"updateDamage:%1:%2",
_newDamage,
_constructionObject getVariable ["ExileDatabaseID",-1]
]) call ExileServer_system_database_query_fireAndForget;
_constructionObject call ExileServer_util_setDamageTexture;
};
};
};
_chargesDetonated = _chargesDetonated + 1;
ExileServerBreachingCharges deleteAt _forEachIndex;
};
}
forEach ExileServerBreachingCharges;
};
};
if (_chargesDetonated isEqualTo 0) then
{
[_sessionID, "toastRequest", ["InfoTitleOnly", ["There are no breaching charges to detonate."]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,56 @@
/**
* ExileServer_system_clan_database_load
*
* 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["_clanID","_clanInfo","_clanMembers","_allMarkers","_markers","_polys","_markerID","_markerType","_position","_color","_icon","_iconSize","_text","_textSize","_marker","_poly","_hashValue"];
_clanID = _this;
_clanInfo = format ["getClanInfo:%1",_clanID] call ExileServer_system_database_query_selectSingle;
_clanMembers = format ["getClanMembers:%1",_clanID] call ExileServer_system_database_query_selectFull;
_allMarkers = format ["getClanMarkers:%1",_clanID] call ExileServer_system_database_query_selectFull;
_markers = [];
_polys = [];
{
_markerID = _x select 0;
_markerType = _x select 1;
_position = _x select 2;
_color = _x select 3;
switch _markerType do
{
case 0 :
{
_icon = _x select 4;
_iconSize = _x select 5;
_text = _x select 6;
_textSize = _x select 7;
_marker = [_icon,_color,_position,_iconSize,_text,_textSize,_markerID];
_markers pushback _marker;
};
case 1 :
{
_poly = [_position,_color,_markerID];
_polys pushback _poly;
};
default
{
};
};
}
forEach _allMarkers;
_hashValue =
[
_clanInfo select 0,
_clanInfo select 1,
_clanMembers,
_markers,
_polys,
grpNull
];
missionNamespace setVariable [format ["ExileServer_clan_%1",_clanID],_hashValue];
true

View File

@ -0,0 +1,82 @@
/**
* ExileServer_system_clan_network_addMarkerRequest
*
* 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["_sessionID","_parameters","_player","_clanID","_clanHash","_icon","_color","_position","_iconSize","_text","_textSize","_maxChars","_alphabet","_forbiddenCharacter","_maxAmountOfMarkers","_data","_extDB2Message","_markerID","_markers"];
_sessionID = _this select 0;
_parameters = _this select 1;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist! :)";
};
_clanID = _player getVariable ["ExileClanID",-1];
if(_clanID isEqualTo -1)then
{
throw "You are not in a family!";
};
_clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]];
if(_clanHash isEqualTo [])then
{
throw "Family data is broken!";
};
_icon = _parameters select 0;
_color = _parameters select 1;
_position = _parameters select 2;
_iconSize = _parameters select 3;
_text = _parameters select 4;
_textSize = _parameters select 5;
_maxChars = getNumber (missionConfigFile >> "CfgClans" >> "maximumIconText");
if((count _text) > _maxChars)then
{
throw format ["To big marker text MAX : %1",_maxChars];
};
_alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet");
_forbiddenCharacter = [_text, _alphabet] call ExileClient_util_string_containsForbiddenCharacter;
if !(_forbiddenCharacter isEqualTo -1) then
{
throw "Invalid character in input!";
};
if!((count _color) isEqualTo 4)then
{
throw "FuckOff and die in fire!";
};
if!((count _position) isEqualTo 2)then
{
throw "FuckOff and die in fire! #2";
};
_forbiddenCharacter = [_icon, _alphabet] call ExileClient_util_string_containsForbiddenCharacter;
if !(_forbiddenCharacter isEqualTo -1) then
{
throw "FuckOff and die in fire! #3";
};
_maxAmountOfMarkers = getNumber(missionConfigFile >> "CfgClans" >> "maximumIcons");
if(count(_clanHash select 3) >= _maxAmountOfMarkers)then
{
throw "Maximum markers reached for family!";
};
_data = [_clanID,_position,_color,_icon,_iconSize,_text,_textSize];
_extDB2Message = ["addMarker", _data] call ExileServer_util_extDB2_createMessage;
_markerID = _extDB2Message call ExileServer_system_database_query_insertSingle;
_markers = _clanHash select 3;
_parameters pushback _markerID;
_markers pushback _parameters;
_clanHash set [3,_markers];
missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash];
_clanID call ExileServer_system_clan_updateMarkers;
[_sessionID, "toastRequest", ["SuccessTitleOnly", ["Added a family marker!"]]] call ExileServer_system_network_send_to;
}
catch
{
_exception call ExileServer_system_util_log;
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to add marker!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,63 @@
/**
* ExileServer_system_clan_network_addPolyRequest
*
* 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["_sessionID","_parameters","_player","_clanID","_clanHash","_positions","_color","_maxAmountOfPolys","_maxAmountOfPolyLines","_data","_extDB2Message","_polyID","_polys"];
_sessionID = _this select 0;
_parameters = _this select 1;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist! :)";
};
_clanID = _player getVariable ["ExileClanID",-1];
if(_clanID isEqualTo -1)then
{
throw "You are not in a family!";
};
_clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]];
if(_clanHash isEqualTo [])then
{
throw "Family data is broken!";
};
_positions = _parameters select 0;
_color = _parameters select 1;
if!((count _color) isEqualTo 4)then
{
throw "FuckOff and burn in fire #5";
};
_maxAmountOfPolys = getNumber(missionConfigFile >> "CfgClans" >> "maximumPolys");
if(count(_clanHash select 4) >= _maxAmountOfPolys)then
{
throw "Maximum polys reached for family!";
};
_maxAmountOfPolyLines = getNumber(missionConfigFile >> "CfgClans" >> "maximumPolyNode");
if(count _positions > _maxAmountOfPolyLines)then
{
throw "Too many poly nodes!";
};
_data = [_clanID,_positions,_color];
_extDB2Message = ["addPoly", _data] call ExileServer_util_extDB2_createMessage;
_polyID = _extDB2Message call ExileServer_system_database_query_insertSingle;
_polys = _clanHash select 4;
_parameters pushback _polyID;
_polys pushback _parameters;
_clanHash set [4,_polys];
missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash];
_clanID call ExileServer_system_clan_updatePolys;
[_sessionID, "toastRequest", ["SuccessTitleOnly", ["Added a family polygon!", _exception]]] call ExileServer_system_network_send_to;
}
catch
{
_exception call ExileServer_system_util_log;
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to add polygon!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,59 @@
/**
* ExileServer_system_clan_network_inviteToClanRequest
*
* 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["_sessionID","_playerNetID","_invitedPlayer","_player","_clanID","_clanHash"];
_sessionID = _this select 0;
_playerNetID = (_this select 1) select 0;
_invitedPlayer = objectFromNetId _playerNetID;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist! :)";
};
_clanID = _player getVariable ["ExileClanID",-1];
if(_clanID isEqualTo -1)then
{
throw "You are not in a family!";
};
_clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]];
if(_clanHash isEqualTo [])then
{
throw "Family data is broken!";
};
if!(getPlayerUID _player isEqualTo (_clanHash select 1))then
{
throw "You are not the papa!";
};
if(isNull _invitedPlayer)then
{
throw "Cannot invite unknown player!";
};
if!(_invitedPlayer getVariable ["ExileClanID",-1] isEqualTo -1)then
{
throw "That player is already in a family!";
};
if(_invitedPlayer getVariable ["ExileClanInvite",false])then
{
throw "That player already has a family invite!";
};
_invitedPlayer setVariable ["ExileClanInvite",true];
_invitedPlayer setVariable ["ExileClanInviteID",_clanID];
_invitedPlayer setVariable ["ExileClanInviteOwner",_player];
[_invitedPlayer,"inviteToClanRequestClient",[name _player,_clanHash select 0]] call ExileServer_system_network_send_to;
[_sessionID, "toastRequest", ["SuccessTitleOnly", ["Family invite sent!"]]] call ExileServer_system_network_send_to;
}
catch
{
_exception call ExileServer_system_util_log;
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to invite!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,67 @@
/**
* ExileServer_system_clan_network_inviteToClanRequestClientResponse
*
* 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["_sessionID","_accepted","_player","_clanID","_invitedClanID","_inviteOwner","_clanHash","_members"];
_sessionID = _this select 0;
_accepted = (_this select 1) select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "Invalid player!";
};
_clanID = _player getVariable ["ExileClanID",-1];
if !(_clanID isEqualTo -1) then
{
throw "You are already in a family!";
};
if!(_player getVariable ["ExileClanInvite",false])then
{
throw "No pending family invites!";
};
_invitedClanID = _player getVariable ["ExileClanInviteID",-1];
if(_invitedClanID isEqualTo -1)then
{
throw "Invalid family invite!";
};
_inviteOwner = _player getVariable ["ExileClanInviteOwner",objNull];
if(_accepted)then
{
_clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_invitedClanID],[]];
if(_clanHash isEqualTo [])then
{
throw "Family hash is NULL!";
};
_members = _clanHash select 2;
_members pushback [getPlayerUID _player,name _player];
_clanHash set [2,_members];
format["setAccountClanLink:%1:%2", _invitedClanID, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget;
missionNameSpace setVariable [format["ExileServer_clan_%1",_invitedClanID],_clanHash];
_player setVariable ["ExileClanID", _invitedClanID];
_player setVariable ["ExileClanData", _clanHash];
_invitedClanID call ExileServer_system_clan_updateClients;
[_inviteOwner, "toastRequest", ["InfoTitleOnly", [format ["%1 joined your family!", name _player]]]] call ExileServer_system_network_send_to;
}
else
{
[_inviteOwner, "toastRequest", ["InfoTitleOnly", [format ["%1 declined your family invite!", name _player]]]] call ExileServer_system_network_send_to;
};
_player setVariable ["ExileClanInvite",false];
_player setVariable ["ExileClanInviteID",-1];
_player setVariable ["ExileClanInviteOwner",objNull];
[_sessionID,"clanInviteServerResponse",[_accepted]] call ExileServer_system_network_send_to;
}
catch
{
_exception call ExileServer_util_log;
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to join!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,62 @@
/**
* ExileServer_system_clan_network_kickClanPlayerRequest
*
* 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["_sessionID","_requestedKickPlayerUID","_player","_clanID","_clanHash","_clanMembers","_index","_memberName","_kickPlayer"];
_sessionID = _this select 0;
_requestedKickPlayerUID = (_this select 1) select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist! :)";
};
_clanID = _player getVariable ["ExileClanID",-1];
if(_clanID isEqualTo -1)then
{
throw "You are not in a family!";
};
_clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]];
if(_clanHash isEqualTo [])then
{
throw "Family data is broken!";
};
if!((getPlayerUID _player) isEqualTo (_clanHash select 1))then
{
throw "You are not the papa!";
};
_clanMembers = _clanHash select 2;
_index = [_clanMembers,_requestedKickPlayerUID] call ExileClient_util_find;
if(_index isEqualTo -1)then
{
throw "You are not in a family!";
};
_memberName = (_clanMembers select _index) select 1;
_clanMembers deleteAt _index;
_clanHash set [2,_clanMembers];
format["unLinkClanLink:%1", _requestedKickPlayerUID] call ExileServer_system_database_query_fireAndForget;
missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash];
_clanID call ExileServer_system_clan_updateClients;
_kickPlayer = _requestedKickPlayerUID call ExileClient_util_player_objectFromPlayerUid;
if!(isNull _kickPlayer)then
{
_memberName = name _kickPlayer;
_kickPlayer setVariable ["ExileClanID",-1];
_kickPlayer setVariable ["ExileData",[]];
[_kickPlayer, "updateClanGotKicked", ["ErrorTitleOnly",["You have been kicked from your family!"]]] call ExileServer_system_network_send_to;
};
[_sessionID, "toastRequest", ["SuccessTitleOnly", [format["%1 was kicked from the family!", _memberName]]]] call ExileServer_system_network_send_to;
}
catch
{
_exception call ExileServer_util_log;
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to kick!", _exception]]] call ExileServer_system_network_send_to;
};

View File

@ -0,0 +1,74 @@
/**
* ExileServer_system_clan_network_leaveClanRequest
*
* 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["_sessionID","_player","_clanID","_clanHash","_playerUID","_isLeader","_leaderUID","_clanMembers","_clanMembersCount","_index","_message"];
_sessionID = _this select 0;
try
{
_player = _sessionID call ExileServer_system_session_getPlayerObject;
if(isNull _player)then
{
throw "You do not exist!";
};
_clanID = _player getVariable ["ExileClanID",-1];
if(_clanID isEqualTo -1)then
{
throw "You are not in a family!";
};
_clanHash = missionNameSpace getVariable [format["ExileServer_clan_%1",_clanID],[]];
if(_clanHash isEqualTo [])then
{
throw "Broken family data!";
};
_playerUID = (getPlayerUID _player);
_isLeader = _playerUID isEqualTo (_clanHash select 1);
_leaderUID = _clanHash select 1;
_clanMembers = _clanHash select 2;
_clanMembersCount = count _clanMembers;
if(_clanMembersCount > 1)then
{
_index = [_clanMembers,_playerUID] call ExileClient_util_find;
if(_index isEqualTo -1)then
{
throw "Something is really wrong! Contact an admin!";
};
_clanMembers deleteAt _index;
_clanHash set [2,_clanMembers];
if(_isLeader)then
{
_leaderUID = ((_clanMembers select 0) select 0);
_clanHash set [1,_leaderUID];
format["updateClanLeader:%1:%2",_leaderUID,_clanID] call ExileServer_system_database_query_fireAndForget;
_message = format ["You have left the family. %1 has been promoted to be the new papa.",(_clanMembers select 0) select 1];
}
else
{
_message = "You have left the family.";
};
format["unLinkClanLink:%1", _playerUID] call ExileServer_system_database_query_fireAndForget;
missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],_clanHash];
_clanID call ExileServer_system_clan_updateClients;
}
else
{
missionNameSpace setVariable [format["ExileServer_clan_%1",_clanID],nil];
format["deleteClan:%1",_clanID] call ExileServer_system_database_query_fireAndForget;
_message = "The family has been disbanded.";
};
_player setVariable ["ExileClanID", -1];
_player setVariable ["ExileData", []];
[_sessionID,"leaveClanResponse",[_clanMembersCount > 1,_message]] call ExileServer_system_network_send_to;
}
catch
{
_exception call ExileServer_util_log;
[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to leave!", _exception]]] call ExileServer_system_network_send_to;
};

Some files were not shown because too many files have changed in this diff Show More