Comando para saber quem logou na RCON
#1

Bom queria que me ajudassem nesse comando:

Quote:

public RTi()
{
for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
if(LoggedRcon[i] == 0){
//new tmp[256],PName[16];
new string[85],PName[24];
GetPlayerName(i,PName,24);
format(string,sizeof(string),"%s se logou com RCON ",PName);
//GetPlayerName(playerid, PName, sizeof(PName));
//format(String, sizeof(String), "%s se logou com RCON no ", PName);
//GetPlayerName(i,PName,16);
//format(tmp,256,"%s se logou com RCON™",PName);
SendClientMessageToAll(COR_BRANCO ,string);
LoggedRcon[i]=1;
}
}
}
}

Mas, quando eu vou compilar da erro.

Como resolver?
Reply
#2

Quote:
Originally Posted by dayvson123
Bom queria que me ajudassem nesse comando:

Quote:

public RTi()
{
for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
if(LoggedRcon[i] == 0){
//new tmp[256],PName[16];
new string[85],PName[24];
GetPlayerName(i,PName,24);
format(string,sizeof(string),"%s se logou com RCON ",PName);
//GetPlayerName(playerid, PName, sizeof(PName));
//format(String, sizeof(String), "%s se logou com RCON no ", PName);
//GetPlayerName(i,PName,16);
//format(tmp,256,"%s se logou com RCON™",PName);
SendClientMessageToAll(COR_BRANCO ,string);
LoggedRcon[i]=1;
}
}
}
}

Mas, quando eu vou compilar da erro.

Como resolver?
qm vez de:

pawn Код:
if(LoggedRcon[i] == 0){
pawn Код:
if(IsPlayerAdmin){
Reply
#3

Topo do GM
pawn Код:
forward RTi();
Final do GM
pawn Код:
public RTi()
{
  for(new i; i<MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
     if(IsPlayerAdmin){
      //new tmp[256],PName[16];
       new string[85],PName[24];
       GetPlayerName(i,PName,24);
       format(string,sizeof(string),"%s se logou com RCON ",PName);
      //GetPlayerName(playerid, PName, sizeof(PName));
      //format(String, sizeof(String), "%s se logou com RCON no ", PName);
      //GetPlayerName(i,PName,16);
      //format(tmp,256,"%s se logou com RCON™",PName);
      SendClientMessageToAll(COR_BRANCO ,string);
      LoggedRcon=1;
     }
   }
  }
}
Reply
#4

Quote:

C:\Program Files\Rockstar Games\Gta san Andreas\server\gamemodes\VLC.pwn(47389) : error 076: syntax error in the expression, or invalid function call
C:\Program Files\Rockstar Games\Gta san Andreas\server\gamemodes\VLC.pwn(47389) : error 017: undefined symbol "LoggedRcon"
C:\Program Files\Rockstar Games\Gta san Andreas\server\gamemodes\VLC.pwn(47379) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Reply
#5

manda as linhas
Reply
#6

Quote:

public RTi()
{
for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
if(IsPlayerAdmin){// 47379
//new tmp[256],PName[16];
new string[85],PName[24];
GetPlayerName(i,PName,24);
format(string,sizeof(string),"%s se logou com RCON ",PName);
//GetPlayerName(playerid, PName, sizeof(PName));
//format(String, sizeof(String), "%s se logou com RCON no ", PName);
//GetPlayerName(i,PName,16);
//format(tmp,256,"%s se logou com RCON™",PName);
SendClientMessageToAll(COLOR_RED ,string);
LoggedRcon=1;//Linha 47389
}
}
}
}

Reply
#7

Quote:
Originally Posted by Raze_Man
Quote:

public RTi()
{
for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
if(IsPlayerAdmin){// 47379
//new tmp[256],PName[16];
new string[85],PName[24];
GetPlayerName(i,PName,24);
format(string,sizeof(string),"%s se logou com RCON ",PName);
//GetPlayerName(playerid, PName, sizeof(PName));
//format(String, sizeof(String), "%s se logou com RCON no ", PName);
//GetPlayerName(i,PName,16);
//format(tmp,256,"%s se logou com RCON™",PName);
SendClientMessageToAll(COLOR_RED ,string);
LoggedRcon=1;//Linha 47389
}
}
}
}

apaga a linha:

Linha 47389
Reply
#8

Bom fui tentando no GM e consegui fazer, sу que a mensagem nгo aparece.

Estб assim agora:

Quote:

new LoggedRcon[MAX_PLAYERS];

Quote:

forward RTi();

Quote:

public RTi()
{
for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
if(LoggedRcon[i] == 0){
//new tmp[256],PName[16];
new string[85],PName[24];
GetPlayerName(i,PName,24);
format(string,sizeof(string),"%s se logou com RCON",PName);
//GetPlayerName(playerid, PName, sizeof(PName));
//format(String, sizeof(String), "%s se logou com RCON", PName);
//GetPlayerName(i,PName,16);
//format(tmp,256,"%s se logou com RCON",PName);
SendClientMessageToAll(COR_BRANCO ,string);
LoggedRcon[i]=1;
}
}
}
}

Existe como fazer para a mensagem aparecer?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)