UI Creation Lua?
Discussion in 'Rust Development' started by Norn, Aug 25, 2015.
-
tried it some time ago but failed. What I tried for my admin tickets:
had no error but nothing happeningCode:json ="[\"\"name\"\": \"\"TicketGUI\"\",\"\"parent\"\": \"\"Overlay\"\",\"\"components\"\":[{\"\"type\"\":\"\"UnityEngine.UI.Text\"\",\"\"text\"\":\"\"{text}\"\",\"\"fontSize\"\":20,\"\"align\"\": \"\"MiddleCenter\"\",},{\"\"type\"\":\"\"RectTransform\"\",\"\"anchormin\"\": \"\"0 0.20\"\",\"\"anchormax\"\": \"\"1 0.9\"\"}]}]" text ="There currently are <color=aqua>"..#TicketsData.Tickets .."</color> active tickets!" local players = global.BasePlayer.activePlayerList:GetEnumerator() while players:MoveNext()do local currId = rust.UserIDFromPlayer(players.Current) if permission.UserHasPermission(currId,"isTicketsAdmin")then CommunityEntity.ServerInstance:ClientRPCEx( Network:SendInfo(){ connection = players.Current.net.connection },nil,"AddUI",string.gsub(json,"{text}", text)); end end -
So basically c# or nothing in this case... i guess?
-
idk mate It was just a try and I did not get it working.
