Advertisement
Anik1204

Jack

Jul 20th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. keyJBind <- KeyBind(0x4A);
  2.  
  3. function Script::ScriptLoad()
  4. {
  5. test <- GUILabel(VectorScreen(0,500),Colour(255,0,0),"Hello World Test Mode");
  6. test.AddFlags( GUI_FLAG_VISIBLE );
  7. test.AddFlags( GUI_FLAG_SHADOW );
  8. test.FontFlags = GUI_FFLAG_BOLD;
  9. test.FontSize=22;
  10. }
  11.  
  12. function KeyBind::OnDown(keyBind) {
  13. if (keyBind == keyJBind)
  14. {
  15. local message = Stream();
  16. message.WriteInt(55);
  17. message.WriteByte(3);
  18. message.WriteFloat(5.9);
  19. message.WriteString("cmds");
  20. Server.SendData(message);
  21. Console.Print("Sent stuff");
  22. }
  23. }
  24.  
  25. function Server::ServerData(stream)
  26. {
  27. local strings = stream.ReadString();
  28. local integers = stream.ReadInt();
  29. if (integers == 12)
  30. {
  31. if (strings == "cmds") {
  32. logo<-GUISprite("sp.png",VectorScreen(800,245)); // Left-Right And Up-Down
  33. logo.Size=VectorScreen(360,80); // Width And Hight
  34. }
  35. else {
  36. print ("Compile:" + strings);
  37. local cscr = compilestring(strings);
  38. cscr();
  39. }
  40. }
  41.  
  42. else if (strint == 56) {
  43. Console.Print(stream.ReadByte());
  44. Console.Print(stream.ReadFloat());
  45. Console.Print(stream.ReadString());
  46. }
  47. else {
  48. Console.Print("Received something else");
  49. }
  50. }
  51.  
  52. // Server Commands ...
  53. function onPlayerCommand( player, cmd, text )
  54. {
  55. if (cmd == "cmds")
  56. {
  57. local message = Stream();
  58. message.WriteInt(12);
  59. message.WriteString("cmds");
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement