Thread Rating:
  • 3 Vote(s) - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
G2O - Client Side Bots(0.0.4)
#10
Code:
    // Server
    enum packId {
        packetBot,
    };
    
    function createBot(pid, botName) {
        local packet = Packet();
        if(packet) {
            packet.writeChar(packId.packetBot);    
            packet.writeString(botName);    
            
            packet.send(pid, RELIABLE_ORDERED);
        }            
    };
    
    // Client
    enum packId {
        packetBot,
    };
    
    addEventHandler("onPacket", function(packet) {
        local id = packet.readChar();
        if(id == packId.packetBot) {
            local npc = createNpc(packet.readString(), "PC_HERO");
            setPositionNpc(npc, 0, 200, 0);
        }
    });
Reply


Messages In This Thread
G2O - Client Side Bots(0.0.4) - by KimiorV - 01.10.2016, 21:19
RE: G2O - Client Side Bots(0.0.4) - by Bimbol - 01.10.2016, 23:23
RE: G2O - Client Side Bots(0.0.4) - by Bimbol - 16.11.2016, 21:37
RE: G2O - Client Side Bots(0.0.4) - by Bimbol - 16.11.2016, 21:40
RE: G2O - Client Side Bots(0.0.4) - by KimiorV - 16.11.2016, 21:54
RE: G2O - Client Side Bots(0.0.4) - by Baster - 16.01.2017, 09:57

Possibly Related Threads…
Thread Author Replies Views Last Post
  [New G2O][Client-Side] GUI Patrix 1 3,345 02.01.2021, 05:22
Last Post: Patrix
  [G2O] SpeedBlock Marbar 16 11,061 13.10.2020, 15:32
Last Post: Sative
  [New G2O][Client-Side] LocalStorage Patrix 0 2,426 08.05.2020, 16:38
Last Post: Patrix
  [New G2O] Module example Patrix 4 7,689 17.05.2019, 01:30
Last Post: Patrix
  [New G2O][Client-Side] Music Module Nubzior 3 5,916 24.05.2018, 08:07
Last Post: Nubzior
  [DEV] G2O Bot module Sative 64 59,233 25.11.2016, 20:13
Last Post: HammelGammel
  G2O Client side bots KimiorV 4 5,907 09.06.2016, 20:11
Last Post: KimiorV

Forum Jump:


Users browsing this thread: 1 Guest(s)