Lookup.inc problem
#1

im using lookup.inc i made the script when player join to show the country name but it doesnt show
Example: it shows this Info: punisher has connected [Country Name]: ? [Country Region]: ?
isnt showing the country name :/
pawn Код:
public OnLookupComplete(playerid)
{
 new string[300];
 new name[24];
 GetPlayerName(playerid, name, sizeof(name));
 format(string, sizeof(string), "{FF00EA}Info: %s has connected {FFAF00}[Country Name]: {FF8000}%s {FFAF00}[Country Region]: {A90202}%s", name,GetPlayerCountryName(playerid),GetPlayerCountryRegion(playerid));
 SendClientMessageToAll(-1,string);

 if(IsProxyUser(playerid))
 {
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "Kick: {FFFFFF}%s{FF00EA} has Been Kicked From The Server Reason Using Proxy.", name);
    SendClientMessageToAll(red,string);
    Kick(playerid);
 }
 return 1;
}
P.s = is there any other method to kick nerds who change ip using proxy?
Reply
#2

This is exactly how i made it, it dosent work for me aswell, but,
Код:
DisplayLookupData(playerid, targetid)
It works well in this function.
Reply
#3

and where i can add this function?>
Reply
#4

It's basicly a function wich opens dialog with all targetid data like :Country,Region, Host,... But i dont suggest you to use it at on player connect. Seems like include is broken and it need update or we dont know how to use it.
Reply
#5

I made it like this in my script and it works good for me.
pawn Код:
public OnLookupComplete(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new lookup[128];
        new name[24];
        GetPlayerName(playerid,name, sizeof(name));
        if(IsProxyUser(playerid))
        {
            SetTimerEx("KickPlayerOut",1000,0,"i",playerid);
        }
        else
        {
            format(lookup, sizeof(lookup),"[INFO] %s (%d) Has joined ************ Roleplay! ( Country: %s )",name, playerid, GetPlayerCountryName(playerid));
        }
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(PlayerInfo[i][pAdmin] >= 1)
                {
                    SCM(i,COLOR_RLRPGBLUE,lookup);
                }
            }
        }
    }
    return 1;
}
Reply
#6

still the same problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)