Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- obj_servidor_start:
- [create]
- // Iniciando a 39dll.
- dllinit(0, true, false);
- // Criando o listener.
- porta_servidor = get_integer("Qual porta deseja conectar-se? ", 8040);
- servidor = tcplisten(porta_servidor, 5, 1);
- if(servidor <= 0)
- {
- show_message("Porta inválida!");
- }
- global.players_online = 0;
- [step]
- // Conferindo se houve conexões:
- stcp = tcpaccept(servidor, true);
- if(stcp)
- {
- show_message("Conectado!")
- }
- else
- {
- show_message("Não foi possível inicializar o servidor.")
- dllfree();
- game_end();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement