Small help
#1

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success)
    {
        new pip[16];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            new nameee[MAX_PLAYER_NAME];
            GetPlayerName(i, nameee, 16);
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
            {
                printf("Failed RCON Login attempt by %s. ID: %i IP: %s - Password: %s", nameee,ip, password);
                RconLog(printf);
            }
        }
    }
    else
    {
        new str[170];
        new nameee[MAX_PLAYER_NAME];
        GetPlayerName(playerid, nameee, 16);
        format(str,sizeof str,"2%s is logged in RCON with Password: %s - IP %s logged into rcon.",nameee,password,ip);
        RconLog(str);
    }
    return 1;
}
error 076: syntax error in the expression, or invalid function call
error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Line 1732
pawn Код:
RconLog(printf);
Line 1740
pawn Код:
GetPlayerName(playerid, nameee, 16);
Reply
#2

First Error: printf is a function, it will just give errors if you try use it as a variable.
Second Error: There is no playerid in OnRconLoginAttempt. Loop through all the players using GetPlayerIP to find the player.
Reply
#3

[EDIT]
Ohh..to late..
Reply
#4

Ah nvm,fixed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)