GetPlayersInZone - ZoneManager
Discussion in 'Rust Development' started by PsychoTea, Sep 8, 2015.
-
Code:
[PluginReference] Plugin ZoneManager;
Code:object success = ZoneManager?.Call("GetPlayersInZone", ZONEIDHERE); if(success == null) return; var playersList = success as List<BasePlayer>(); foreach(BasePlayer player in playersList) { Debug.Log(player.displayName + " is inside the zone"); } -
MY HEAD HURTS .... Pls Can u Show the new Call Method? Im trying since 3 hours now.-----
-
Its the same as that ^^. You need to specify the zoneID and it will return a List<ulong> of all player ID's or null if there is none
-
i dont even know anymore~ and that i need the zone id . yea i know...Code:
success = ZoneManager?.Call("GetPlayersInZone", "666"); = new List<ulong>(); foreach(var players in playerlist) count++;
i dont know how to handle the list if i just want to get a count. ...
i mean. the "Isplayerinzone Hook i already Used....
bool inside = Convert.ToBoolean(ZoneManager?.Call("isPlayerInZone", "666", player)); -
Code:
object success = ZoneManager?.Call("GetPlayersInZone", ZONEIDHERE); if (success == null) return; var playersList = success as List<ulong>; var count = playersList.Count; // Count the number of entries in the list -
.... i feel dumb.....
Thank you very much .
