04.01.2011, 19:44
Hello, I'm not sure what else a script needs to have in it for GetPlayerHost(playerid) to return the hostname.
I have dns.dll in the plugins folder and have it in server.cfg, and #include <dns> at the top, and it compiles fine. Maybe I'm missing something because I don't understand what it means to "add the plugin's natives and callbacks".
Edit: I added this and it's triggered after it does GetPlayerHost(playerid):
So I was able to do what I needed to by having it do GetPlayerHost(playerid) when they connect, and storing the result when OnReverseDNS is triggered. Now I'm just wondering if it's still possible for GetPlayerHost to return the hostname like in the example.
I have dns.dll in the plugins folder and have it in server.cfg, and #include <dns> at the top, and it compiles fine. Maybe I'm missing something because I don't understand what it means to "add the plugin's natives and callbacks".
Edit: I added this and it's triggered after it does GetPlayerHost(playerid):
Код:
public OnReverseDNS(ip[], host[], extra) { new msg[128]; format(msg, sizeof(msg), "Your hostname is %s.", host); SendClientMessage(extra, COLOR_RED, msg); return 1; }