[HELP] to count player objects in server

Darthmard

Member
I'm looking for a script that will count player objects per player on map and limit the amount of said object to be built/purchased like safes or vehicles.

I know I can call like so
_allvaults = (allmissionobjects "VaultStorageLocked");

The count current player objects has me confused if I get that worked out I can then add a build check easy

Help would be appreciated.
 
You will need to count all objects on an type and also for the owner uid

ok so would this work then sorry not a good c++ coder :)

Code:
_ownerID = player getVariable ["CharacterID","0"];
_allvaults = (allmissionobjects "VaultStorageLocked");
_number = (_allvaults && _ownerID == dayz_characterID);
if (count _number == 2) then {
};
 
Looking good.
but with characterID you are only checking for an existing character and not a player.
You need p4l to get stored the playerUID in the database so you can check for players buildables and not of an single character :)
 
Back
Top