Ja, aber, i can still connect without launcher
Beiträge von Cadilab
-
-
Ich habe ein Problem. Wenn ich ohne Launcher-Server verbinden, sagt es, dass ich Launcher haben, aber wenn ich mit Abschussrampe verbinden, sagt es, dass ich Launcher nicht.
C
Alles anzeigen#include <a_samp> #include <socket> #include <foreach> new Socket:g_Socket; main () {} enum SOCKET { PlayerID, SocketIP[19], Name[24] }; new SocketInfo[MAX_PLAYERS][SOCKET]; new Player_Socket_ID[MAX_PLAYERS]={-1,...}; public OnGameModeInit() { g_Socket = socket_create(TCP); new IP[20] = "192.168.1.103"; new Port = 7775; if(tcpConnect(IP, Port)) socket_set_max_connections(g_Socket, 10); socket_listen(g_Socket, Port); return 1; } public OnGameModeExit() { if(is_socket_valid(g_Socket)) socket_destroy(g_Socket); return 1; } stock tcpConnect(ip[], port) { g_Socket = socket_create(TCP); return 1; } stock TCP_server() { g_Socket = socket_create(TCP); new IP[20] = "192.168.1.103"; new Port = 7775; if(udpConnect(IP, Port)) return 0; } public onSocketRemoteConnect(Socket:id, remote_client[], remote_clientid) { printf("[LAUNCHER] Connection to Socket Server. | ClientID: [%d] | ClientIP: [%s] ",remote_clientid, remote_client); format(SocketInfo[remote_clientid][SocketIP], 16, remote_client); return 1; } public onSocketRemoteDisconnect(Socket:id, remote_clientid) { printf("[LAUNCHER] Player Socket ponisten | ClientID: [%d] | PlayerID: [%d] ",remote_clientid, SocketInfo[remote_clientid][PlayerID]); if(IsPlayerConnected(SocketInfo[remote_clientid][PlayerID])) { Player_Socket_ID[SocketInfo[remote_clientid][PlayerID]] = -1; SocketInfo[remote_clientid][PlayerID] = -1; format(SocketInfo[remote_clientid][SocketIP],16,"-1"); format(SocketInfo[remote_clientid][Name], 24, "-1"); } return 1; } public onSocketReceiveData(Socket:id, remote_clientid, data[], data_len) { printf("Remote client [%d] has sent: %s", remote_clientid, data); format(SocketInfo[remote_clientid][Name], 24, data); return 1; } public OnPlayerConnect(playerid) { new IP[16]; GetPlayerIp(playerid, IP, sizeof(IP)); for(new n = 0; n < MAX_PLAYERS; n++) { if(!strcmp(IP, SocketInfo[n][SocketIP], false, strlen(IP)) && !strcmp(ImeIgraca(playerid), SocketInfo[n][Name],false, strlen(ImeIgraca(playerid)))) { SocketInfo[n][PlayerID] = playerid; Player_Socket_ID[playerid] = n; SendClientMessage(playerid, -1, "[LAUNCHER] You are connected to launcher."); printf("[LAUNCHER] Player ID: [%d] se konektovao sa launcherom, ClientID: [%d].",playerid,Player_Socket_ID[playerid]); break; } else { SendClientMessage(playerid, -1,"[LAUNCHER] You didn't use launcher for connection."); break; } } return 1; } public OnPlayerDisconnect(playerid, reason) { printf("[LAUNCHER] Player ID [%d] se diskonektovao sa servera. ClientID je iskljucen: [%d]",playerid,Player_Socket_ID[playerid]); socket_sendto_remote_client(g_Socket, Player_Socket_ID[playerid], "DISCONNECT"); socket_close_remote_client(g_Socket,Player_Socket_ID[playerid]); SocketInfo[Player_Socket_ID[playerid]][PlayerID] = -1; format(SocketInfo[Player_Socket_ID[playerid]][SocketIP],16, "-1"); format(SocketInfo[Player_Socket_ID[playerid]][Name], 24, "-1"); Player_Socket_ID[playerid] = -1; return 1; } stock ImeIgraca(id) { new ime[MAX_PLAYER_NAME]; GetPlayerName(id, ime, sizeof ime); return ime; }
Entschuldigen Sie bitte für mein nicht so gutes Deutsch
-
-
Ich kann etwas Deutsch sprechen
IpV4 is 192.168.1.103
not working
-
Danke, aber ich habe ein anderes Problem
publisher.Send(sendbytes, sendbytes.Lenght)
Error 1 'Lenght' is not a member of 'System.Array'. C:\Users\Nathan\Desktop\Launcher\WindowsApplication1\WindowsApplication1\Elite Team Launcher.vb 56 47 WindowsApplication1
-
Hello, kann jemand bitte überprüfen, ob das funktioniert ?
Visual basic:
CDim saljem As New Sockets.UdpClient(7775) saljem.Connect("127.0.0.1", 7775) Dim sendbytes() As Byte = ASCII.GetBytes(TextBox1.Text)
Pawn:C
Alles anzeigenpublic OnGameModeInit() { if(udpConnect("127.0.0.1", 7775)) { printf("The server has been connected to ucp."); } SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public onSocketRemoteConnect(Socket:id, remote_client[], remote_clientid) { print("Neu connection"); return 1; } stock udpConnect(ip[], port) { Launcher = socket_create(UDP); return socket_connect(Launcher, ip, port); }
das funktioniert nicht.
No debug at connect
-
Hello, i am new on this forums, and unfortunately i don't speak german, but over past few days i have seen lots of people showing their launcher with anticheat and my community needs one.
So if anyone is interested please contact me on pm on english please, thanks in advanced.For the moderators/admins - please don't delete this topic, i have used google translator and this seemed like right one to post it in.