Undefined symbol playerid O.o
#1

Код:
   new PlayerName[MAX_PLAYER_NAME],
    string[128];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); // playerid unfefined here
    format(string, sizeof(string), "%s has tried to rcon login.", PlayerName);
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
i dont get why it says:
Код:
C:\Users\james\Desktop\serverrrrr\gamemodes\Gamemode.pwn(813) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#2

You cannot tell a players ID number through RconLoginAttempt. You'll have to log their IP Address instead. See "GetPlayerIp" on the SA:MP wiki.
Reply
#3

check your forward and the public if contains playerid
Reply
#4

i want when someone trys to rcon login his name appears say he tried to login
Reply
#5

pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
    if(!success) {
          for(new i = 0; i < GetMaxPlayers(); i ++ ) {
                new ipx[16];
                GetPlayerIp(i, ipx, 16);
                if(!strcmp(ipx, ip)) {
                      new PlayerName[MAX_PLAYER_NAME], string[128];
                      GetPlayerName(i, PlayerName, sizeof(PlayerName)); // playerid unfefined here
                      format(string, sizeof(string), "%s has tried to rcon login.", PlayerName);
                      SendClientMessageToAll(COLOR_RED, string);
                      break;
                }
          }
     }
}
Reply
#6

Quote:
Originally Posted by CarltonTheGG
Посмотреть сообщение
pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
    if(!success) {
          for(new i = 0; i < GetMaxPlayers(); i ++ ) {
                new ipx[16];
                GetPlayerIp(i, ipx, 16);
                if(!strcmp(ipx, ip)) {
                      new PlayerName[MAX_PLAYER_NAME], string[128];
                      GetPlayerName(i, PlayerName, sizeof(PlayerName)); // playerid unfefined here
                      format(string, sizeof(string), "%s has tried to rcon login.", PlayerName);
                      SendClientMessageToAll(COLOR_RED, string);
                      break;
                }
          }
     }
}


beat me to it! ARG!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)