Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- keyJBind <- KeyBind(0x4A);
- function Script::ScriptLoad()
- {
- test <- GUILabel(VectorScreen(0,500),Colour(255,0,0),"Hello World Test Mode");
- test.AddFlags( GUI_FLAG_VISIBLE );
- test.AddFlags( GUI_FLAG_SHADOW );
- test.FontFlags = GUI_FFLAG_BOLD;
- test.FontSize=22;
- }
- function KeyBind::OnDown(keyBind) {
- if (keyBind == keyJBind)
- {
- local message = Stream();
- message.WriteInt(55);
- message.WriteByte(3);
- message.WriteFloat(5.9);
- message.WriteString("cmds");
- Server.SendData(message);
- Console.Print("Sent stuff");
- }
- }
- function Server::ServerData(stream)
- {
- local strings = stream.ReadString();
- local integers = stream.ReadInt();
- if (integers == 12)
- {
- if (strings == "cmds") {
- logo<-GUISprite("sp.png",VectorScreen(800,245)); // Left-Right And Up-Down
- logo.Size=VectorScreen(360,80); // Width And Hight
- }
- else {
- print ("Compile:" + strings);
- local cscr = compilestring(strings);
- cscr();
- }
- }
- else if (strint == 56) {
- Console.Print(stream.ReadByte());
- Console.Print(stream.ReadFloat());
- Console.Print(stream.ReadString());
- }
- else {
- Console.Print("Received something else");
- }
- }
- // Server Commands ...
- function onPlayerCommand( player, cmd, text )
- {
- if (cmd == "cmds")
- {
- local message = Stream();
- message.WriteInt(12);
- message.WriteString("cmds");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement