Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Oct 21st, 2015 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PLUGIN = nil;
  2.  
  3. function Initialize(Plugin)
  4.     Plugin:SetName("NewPlugin")
  5.     Plugin:SetVersion(1)
  6.      
  7.     -- Hooks
  8.      
  9.     PLUGIN = Plugin -- NOTE: only needed if you want OnDisable() to use GetName() or something like that
  10.      
  11.     -- Command Bindings
  12.     cPluginManager.BindCommand("/serverchange", "test.node", ServerChange, " - Description of command")
  13.      
  14.      
  15.     LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
  16.     return true
  17. end
  18.  
  19. function ServerChange(a_Script,a_Player)
  20.     --[[
  21.     local server = "lobby";
  22.     local player = a_Player:GetName();
  23.     local StringLen = server:len();
  24.     local bytearray = {};
  25.     local bytestring = "";
  26.     local connectarray = "\\0\\7";
  27.     local connect = "Connect";
  28.     local ConnectLen = connect:len();
  29. --  local cHandle = a_Player:cClientHandle();
  30.     for i = 1, ConnectLen do
  31.         connectarray = connectarray .. "\\";
  32.         local nextbyte2 = string.byte(connect,i)
  33.         local nextstring2 = tostring(nextbyte2);
  34.         connectarray = connectarray .. nextstring2;
  35.         table.insert(bytearray,nextbyte);
  36.     end
  37.     connectarray = connectarray .. "\\0\\14";
  38.     table.insert(bytearray,string.byte(" "))
  39.     for i = 1, StringLen do
  40.         bytestring = bytestring .. "\\";
  41.         local nextbyte = string.byte(server,i)
  42.         local nextstring = tostring(nextbyte);
  43.         bytestring = bytestring .. nextstring;
  44.         table.insert(bytearray,nextbyte);
  45.     end
  46.         --]]
  47. --  a_Player:GetClientHandle():SendPluginMessage("BungeeCord", "\0\7Connect\0\14" .. bytestring);
  48.     a_Player:GetClientHandle():SendPluginMessage("BungeeCord", "\0\7Connect\0\14lobby");
  49. --  a_Player:GetClientHandle():SendPluginMessage("BungeeCord", connectarray);
  50. --  a_Player:GetClientHandle():SendPluginMessage("BungeeCord", bytearray);
  51. --  a_Player:GetClientHandle():SendPluginMessage("BungeeCord", "Connect" .. server);
  52. --  a_Player:GetClientHandle():SendPluginMessage("BungeeCord", "ConnectOther " .. player .. " " .. server);
  53. --  a_Player:GetClientHandle():SendPluginMessage("BungeeCord", "");
  54. end
  55. function OnDisable()
  56.     LOG(PLUGIN:GetName() .. " is shutting down...")
  57. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top