Hello, do you know Lua?
Well if you do can you please start a convocation with me, I have a bit of code that I need changing, its to allow people to cancel there TP after accepted, but one line of code isn't working. So please message me if you can help
This code
self:SendMessage( originPlayer, "4")
(and)
self:SendMessage( originPlayer, "6")
(Don't Work)
Once it is done, I shall let the public have the code for other server owners to useCode:function PLUGIN: cmdTeleportCancel( player, cmd) local playerID = rust.UserIDFromPlayer( player ) if PendingRequests[playerID] then local originPlayerID = rust.UserIDFromPlayer( originPlayer ) local originPlayer = PlayersRequests[playerID] self:SendMessage( originPlayer, "1") self:SendMessage( player, "2") PendingRequests[playerID]:Destroy() PendingRequests[playerID] = nil PlayersRequests[playerID] = nil PlayersRequests[originPlayerID] = nil end if TeleportTimers[playerID] then self:SendMessage( player, "3") self:SendMessage( originPlayer, "4") TeleportTimers[playerID].timer:Destroy() TeleportTimers[playerID] = nil end if TeleportTimers[originPlayerID] then self:SendMessage( player, "5") self:SendMessage( originPlayer, "6") TeleportTimers[originPlayerID].timer:Destroy() TeleportTimers[originPlayerID] = nil end end
The Numbers are just to test for if the code works![]()
Do you know Lua??
Discussion in 'Rust Development' started by MisterPixie, Apr 7, 2016.
-
Best to post what you have so all can help
-
Ok Sure
)))))))))))
[DOUBLEPOST=1459984605][/DOUBLEPOST]Go wild my children!
[DOUBLEPOST=1459984780][/DOUBLEPOST]With all respects, if you find a fix for this code. Please comment it back in the room so othere people can enjoy it. -
Can't wait till m-Teleporation is ported into C#
, try overriding plugins.CallHook( "CanTeleport", arr ) when the player tries to cancel it.
Just a option I guess, im not the best with lua as me myself I ported over to C#
-
I don't even get an error with this XD. Just dose not want to send it...
-
Ah, I got it straight from the plugin itself so it might need a few more args or something. I could do a lot more if this was C# be hasn't ported it yet *Cough cough* xD
