Jump to content

Search the Community

Showing results for tags 'broke'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
  • DayZ
    • Discussion
    • Public Servers
    • DayZ SA Resources
    • Q&A Section
  • ArmA 3
    • Epoch Survival
    • Community Projects
    • Q&A Section
    • Terrain Discussion
    • Resources
  • Arma 3 Resources
  • ArmA 2
    • General Discussion.
    • Q&A Section
    • Resources
    • Legacy Resources
    • A2: Community Projects
    • A2 Community Servers
  • Space Engineers
    • General Discussion.
    • Public Servers
  • Other Games
    • Discussion
  • Off Topic
    • Off Topic

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hello, Looking for some help with this Code i am trying to add to our server as a backpack theft protection when inside safezones. We had something similar up to now but it just didn't work very well. I am adding this code to the bottom of my custom fn_gearMenuChecks.sqf which is called in the MPMission\compiles.sqf. I've added comments trying to explain what it is doing (WE ALSO USE CUSTOM FRIENDLIST SYSTEM, so things may look strange) THE CODE: if (inSafeZone) then //if player inside a safezone { _playerNear = (({isPlayer _x} count (nearestObjects [player, ['Man'],6])) > 1); //there is another player within 6m of you if (_playerNear) then //if player within 6m { //define variables _puid = getPlayerUID player; _fuid = getPlayerUID cursorTarget; _playerID = player getVariable ["CharacterID", "0"]; _targetid = cursorTarget getVariable ["CharacterID", "0"]; _sFriends = player getVariable ["friendlies", []]; _pfls = player getVariable ["AH_friendlist",[]]; _tFriends = cursorTarget getVariable ["friendlies", []]; _ffls = cursorTarget getVariable ["AH_friendlist",[]]; _isFriend = (((_targetid in _sFriends)&&(_playerID in _tFriends)) || ((_fuid in _pfls)&&(_puid in _ffls))); //player is inside your friendslist _isLootpile = (cursorTarget isKindOf "WeaponHolder"); //cursortarget is a lootpile if (!_isFriend || _isLootpile) then //if target not inside friendslist OR cursortarget is a lootpile { _display closeDisplay 1; // do not allow gear access cutText ["\nANTI-THEFT: You cannot access non-friends gear/backpacks in safezone!","PLAIN DOWN"]; //text }; }; }; Point is that if you are inside a safezone and there is another player within 6m: - if target player is not inside your friendslist = you cannot access their gear/backpack - if you target a lootpile = no gear access The problem is that it does not let me access anyones gear if there is another player within 6m, no matter if they are in my friendslist or not. Very tired trying to figure out what could be wrong, does this code look allright? Here's my whole fn_gearMenuChecks.sqf: http://pastebin.com/znjtWC8R Any help is appreciated
×
×
  • Create New...