C#
I can translate it 50/50 but i want to see the correct oneCode:void OnPlayerDisconnected(BasePlayer player) { FlyMode fly = player.GetComponent<FlyMode>(); if (fly) fly.enabled = false; }
also tell me what is "class" in C#
Can someone translate me some lines from C# to lua?
Discussion in 'Rust Development' started by PaiN, Apr 19, 2015.
-
You cant do it in Lua (it's a first reason because i moved to c#)
-
fck sake ;/ bcs i wanted to do the same in god

So there is no way ehh
and what about this ? but i think with timers it works.. bcs u can destroy them
Code:function PLUGIN:OnPlayerDisconnected( player ) local steam = rust.UserIDFromPlayer(player) if Timers[steam] then Timers[steam]:Destroy() print("Timer destroyed for MoneyTime on disconnect:DEBUG") else print("No MoneyTime Timer found for player on disconnect:DEBUG") end end
