geo ip
#1

i get some errors after i tried to modify the geo ip filterscript, as i didnt want the ping..

but i need help, this is my on player connect

pawn Код:
public OnPlayerConnect(playerid)
{
    AdminColor1[playerid] = 0;
    PLVL[playerid] = 0;
    AdminLogTries[playerid] = 0;
    g_GotInvitedToDuel[playerid] = 0;
    g_HasInvitedToDuel[playerid] = 0;
    g_IsPlayerDueling[playerid]  = 0;
    gPlayerLogged[playerid] = 0;
    Muted[playerid] = 0;
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    new string1[64];
    GetPlayerName(playerid, name, sizeof(name));
    new Country[256];
    GetPlayerCountry(playerid,Country);
    new mess[256],IP[256];
    GetPlayerIp(playerid,IP,sizeof(IP));
    format(mess,sizeof(mess),"%s [ IP: %s. Country: %s] has joined the server",GetPName(playerid), IP,Country(playerid));
    MessageToAdmin(Grey, string1);
    if (!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register your account", "Enter a password", "Register", "Quit");
    }
    if(fexist(file))
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login to your account", "Enter your password", "Login", "Quit");
    }
    return 1;
}
errors ;

pawn Код:
E:\GTA San Andreas\Server\gamemodes\DMWorld.pwn(212) : error 012: invalid function call, not a valid address
E:\GTA San Andreas\Server\gamemodes\DMWorld.pwn(212) : warning 215: expression has no effect
E:\GTA San Andreas\Server\gamemodes\DMWorld.pwn(212) : error 001: expected token: ";", but found ")"
E:\GTA San Andreas\Server\gamemodes\DMWorld.pwn(212) : error 029: invalid expression, assumed zero
E:\GTA San Andreas\Server\gamemodes\DMWorld.pwn(212) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
this line
pawn Код:
format(mess,sizeof(mess),"%s [ IP: %s. Country: %s] has joined the server",GetPName(playerid), IP,Country(playerid));
Reply
#2

anyone ?
Reply
#3

try this

pawn Код:
format(mess,sizeof(mess),"%s has joined the CRIME LIFE ROLEPLAY.  [ Country: %s | IP Address: %s | Ping: %i ]",GetPName(playerid),Country,IP,GetPlayerPing(playerid));
Reply
#4

im sorry, maybe i wasnt clear enough, i mean i dont want ping, only country , ip
Reply
#5

Country(playerid) -> GetPlayerCountryName(playerid)
Reply
#6

error 017: undefined symbol "GetPlayerCountryName" ?
Reply
#7

Corrected:

pawn Код:
new Country[50],IP[20];
GetPlayerCountry(playerid,Country);
GetPlayerIp(playerid,IP,sizeof(IP));
new mess[128];
format(mess,sizeof(mess),"%s has joined the CRIME LIFE ROLEPLAY.  [ Country: %s | IP Address:%s]",GetPName(playerid),Country,IP);
Dont use these high string values btw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)