SA-MP Forums Archive
[Ajuda] RconLoginAttemp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] RconLoginAttemp (/showthread.php?tid=239576)



[Ajuda] RconLoginAttemp - Wendell_. - 13.03.2011

Fiz esse code abaixo ele mostra a mensagem no console a talz. Sendo que ele nгo dб as armas, colete e nem a grana. O que hб de errado no code?

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{

if(success)
{
 printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
 new pip[16];
 for(new i=0; i<MAX_PLAYERS; i++)
 {
  GetPlayerIp(i, pip, sizeof(pip));
  if(strcmp(ip, pip, false))
  {
   SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
   GivePlayerWeapon(i, 38, 99999);
   GivePlayerWeapon(i, 1, 99999);
   GivePlayerWeapon(i, 8, 99999);
   GivePlayerWeapon(i, 13, 99999);
   GivePlayerWeapon(i, 16, 99999);
   GivePlayerWeapon(i, 24, 99999);
   GivePlayerWeapon(i, 26, 99999);
   GivePlayerWeapon(i, 28, 99999);
   GivePlayerWeapon(i, 31, 99999);
   GivePlayerWeapon(i, 34, 99999);
   GivePlayerWeapon(i, 43, 99999);
   SetPlayerArmour(i, 100.0);
   GivePlayerMoney(i, 50000);
   SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
   }
   }
   }
   return 1;
   }



Re: [Ajuda] RconLoginAttemp - JonathanFeitosa - 13.03.2011

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{

if(success)
{
 printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
 new pip[16];
 for(new i=0; i<MAX_PLAYERS; i++)
 {
  GetPlayerIp(i, pip, sizeof(pip));
  if(strcmp(ip, pip, false))
  {
   SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
   GivePlayerWeapon(playerid, 38, 99999);
   GivePlayerWeapon(playerid, 1, 99999);
   GivePlayerWeapon(playerid, 8, 99999);
   GivePlayerWeapon(playerid, 13, 99999);
   GivePlayerWeapon(playerid, 16, 99999);
   GivePlayerWeapon(playerid, 24, 99999);
   GivePlayerWeapon(playerid, 26, 99999);
   GivePlayerWeapon(playerid, 28, 99999);
   GivePlayerWeapon(playerid, 31, 99999);
   GivePlayerWeapon(playerid, 34, 99999);
   GivePlayerWeapon(playerid, 43, 99999);
   SetPlayerArmour(playerid, 100.0);
   GivePlayerMoney(playerid, 50000);
   SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
   }
   }
   }
   return 1;
   }



Re: [Ajuda] RconLoginAttemp - Wendell_. - 13.03.2011

Quote:
Originally Posted by Jonathan_Feitosa
Посмотреть сообщение
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{

if(success)
{
 printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
 new pip[16];
 for(new i=0; i<MAX_PLAYERS; i++)
 {
  GetPlayerIp(i, pip, sizeof(pip));
  if(strcmp(ip, pip, false))
  {
   SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
   GivePlayerWeapon(playerid, 38, 99999);
   GivePlayerWeapon(playerid, 1, 99999);
   GivePlayerWeapon(playerid, 8, 99999);
   GivePlayerWeapon(playerid, 13, 99999);
   GivePlayerWeapon(playerid, 16, 99999);
   GivePlayerWeapon(playerid, 24, 99999);
   GivePlayerWeapon(playerid, 26, 99999);
   GivePlayerWeapon(playerid, 28, 99999);
   GivePlayerWeapon(playerid, 31, 99999);
   GivePlayerWeapon(playerid, 34, 99999);
   GivePlayerWeapon(playerid, 43, 99999);
   SetPlayerArmour(playerid, 100.0);
   GivePlayerMoney(playerid, 50000);
   SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
   }
   }
   }
   return 1;
   }
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
No OnRconLoginArrempt sу й possнvel usar: ip, password. Nгo pode usar o playerid. Porque a Callback nгo deixa ._.


Re: [Ajuda] RconLoginAttemp - JonathanFeitosa - 13.03.2011

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{

  if(success)
  {
    printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
    new pip[16];
    for(new i; i < MAX_PLAYERS; i ++)
   {
    GetPlayerIp(i, pip, sizeof(pip));
    if(IsPlayerConnected(i))
    {
    if(strcmp(ip, pip, false))
   {
      SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
      GivePlayerWeapon(i, 38, 99999);
      GivePlayerWeapon(i, 1, 99999);
      GivePlayerWeapon(i, 8, 99999);
      GivePlayerWeapon(i, 13, 99999);
      GivePlayerWeapon(i, 16, 99999);
      GivePlayerWeapon(i, 24, 99999);
      GivePlayerWeapon(i, 26, 99999);
      GivePlayerWeapon(i, 28, 99999);
      GivePlayerWeapon(i, 31, 99999);
      GivePlayerWeapon(i, 34, 99999);
      GivePlayerWeapon(i, 43, 99999);
      SetPlayerArmour(i, 100.0);
      GivePlayerMoney(i, 50000);
      SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
           }
        }
      }
   }
   return 1;
 }
tenta...


Re: [Ajuda] RconLoginAttemp - Wendell_. - 14.03.2011

Quote:
Originally Posted by Jonathan_Feitosa
Посмотреть сообщение
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{

  if(success)
  {
    printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
    new pip[16];
    for(new i; i < MAX_PLAYERS; i ++)
   {
    GetPlayerIp(i, pip, sizeof(pip));
    if(IsPlayerConnected(i))
    {
    if(strcmp(ip, pip, false))
   {
      SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
      GivePlayerWeapon(i, 38, 99999);
      GivePlayerWeapon(i, 1, 99999);
      GivePlayerWeapon(i, 8, 99999);
      GivePlayerWeapon(i, 13, 99999);
      GivePlayerWeapon(i, 16, 99999);
      GivePlayerWeapon(i, 24, 99999);
      GivePlayerWeapon(i, 26, 99999);
      GivePlayerWeapon(i, 28, 99999);
      GivePlayerWeapon(i, 31, 99999);
      GivePlayerWeapon(i, 34, 99999);
      GivePlayerWeapon(i, 43, 99999);
      SetPlayerArmour(i, 100.0);
      GivePlayerMoney(i, 50000);
      SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
           }
        }
      }
   }
   return 1;
 }
tenta...
Nгo deu.


Re: [Ajuda] RconLoginAttemp - rjjj - 14.03.2011

Isto deve resolver o seu problema

pawn Код:
//No OnPlayerUpdate ficaria assim:

public OnPlayerUpdate(playerid)
{
    if(IsPlayerAdmin(playerid) && !GetPVarInt(playerid,"Uma Vez"))
    {
        SendClientMessage(playerid, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
        GivePlayerWeapon(playerid, 38, 99999);
        GivePlayerWeapon(playerid, 1, 99999);
        GivePlayerWeapon(playerid, 8, 99999);
        GivePlayerWeapon(playerid, 13, 99999);
        GivePlayerWeapon(playerid, 16, 99999);
        GivePlayerWeapon(playerid, 24, 99999);
        GivePlayerWeapon(playerid, 26, 99999);
        GivePlayerWeapon(playerid, 28, 99999);
        GivePlayerWeapon(playerid, 31, 99999);
        GivePlayerWeapon(playerid, 34, 99999);
        GivePlayerWeapon(playerid, 43, 99999);
        SetPlayerArmour(playerid, 100.0);
        GivePlayerMoney(playerid, 50000);
        SendClientMessage(playerid, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
        SetPVarInt(playerid,"Uma Vez",true);
    }
    return 1;
}

Espero ter ajudado


Re: [Ajuda] RconLoginAttemp - zSuYaNw - 14.03.2011

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
        printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && IsPlayerAdmin(i))
            {
                GetPlayerIp(i, pip, sizeof(pip));
                if(strcmp(ip, pip, false))
                {
                    SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
                    GivePlayerWeapon(playerid, 38, 99999);
                    GivePlayerWeapon(playerid, 1, 99999);
                    GivePlayerWeapon(playerid, 8, 99999);
                    GivePlayerWeapon(playerid, 13, 99999);
                    GivePlayerWeapon(playerid, 16, 99999);
                    GivePlayerWeapon(playerid, 24, 99999);
                    GivePlayerWeapon(playerid, 26, 99999);
                    GivePlayerWeapon(playerid, 28, 99999);
                    GivePlayerWeapon(playerid, 31, 99999);
                    GivePlayerWeapon(playerid, 34, 99999);
                    GivePlayerWeapon(playerid, 43, 99999);
                    SetPlayerArmour(playerid, 100.0);
                    GivePlayerMoney(playerid, 50000);
                    SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
                }
            }
        }
   }
   return 1;
}



Re: [Ajuda] RconLoginAttemp - Wendell_. - 14.03.2011

Quote:
Originally Posted by rjjj
Посмотреть сообщение
Isto deve resolver o seu problema

pawn Код:
//No OnPlayerUpdate ficaria assim:

public OnPlayerUpdate(playerid)
{
    if(IsPlayerAdmin(playerid) && !GetPVarInt(playerid,"Uma Vez"))
    {
        SendClientMessage(playerid, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
        GivePlayerWeapon(playerid, 38, 99999);
        GivePlayerWeapon(playerid, 1, 99999);
        GivePlayerWeapon(playerid, 8, 99999);
        GivePlayerWeapon(playerid, 13, 99999);
        GivePlayerWeapon(playerid, 16, 99999);
        GivePlayerWeapon(playerid, 24, 99999);
        GivePlayerWeapon(playerid, 26, 99999);
        GivePlayerWeapon(playerid, 28, 99999);
        GivePlayerWeapon(playerid, 31, 99999);
        GivePlayerWeapon(playerid, 34, 99999);
        GivePlayerWeapon(playerid, 43, 99999);
        SetPlayerArmour(playerid, 100.0);
        GivePlayerMoney(playerid, 50000);
        SendClientMessage(playerid, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
        SetPVarInt(playerid,"Uma Vez",true);
    }
    return 1;
}

Espero ter ajudado
Infelizmente continuou sem acontecer nada =/


Re: [Ajuda] RconLoginAttemp - LuxurioN™ - 14.03.2011

Quote:
Originally Posted by rjjj
Посмотреть сообщение
Isto deve resolver o seu problema

pawn Код:
//...
Espero ter ajudado
Bom. Assim tambйm deve resolver:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
        printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            new PlayerIP[16];
            GetPlayerIp(i, PlayerIP, 16);
            if(!strcmp(ip, PlayerIP,true))
            {
                SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
                GivePlayerWeapon(i, 38, 99999);
                GivePlayerWeapon(i, 1, 99999);
                GivePlayerWeapon(i, 8, 99999);
                GivePlayerWeapon(i, 13, 99999);
                GivePlayerWeapon(i, 16, 99999);
                GivePlayerWeapon(i, 24, 99999);
                GivePlayerWeapon(i, 26, 99999);
                GivePlayerWeapon(i, 28, 99999);
                GivePlayerWeapon(i, 31, 99999);
                GivePlayerWeapon(i, 34, 99999);
                GivePlayerWeapon(i, 43, 99999);
                SetPlayerArmour(i, 100.0);
                GivePlayerMoney(i, 50000);
                SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
            }
        }
    }
    return 1;
}



Re: [Ajuda] RconLoginAttemp - Wendell_. - 14.03.2011

Quote:
Originally Posted by LuxurioN™
Посмотреть сообщение
Bom. Assim tambйm deve resolver:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
        printf("Logado com sucesso na Rcon pelo IP %s usando a senha %s",ip, password);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            new PlayerIP[16];
            GetPlayerIp(i, PlayerIP, 16);
            if(!strcmp(ip, PlayerIP,true))
            {
                SendClientMessage(i, COLOR_WHITE,"[INFO] Logado na Rcon com sucesso!");
                GivePlayerWeapon(i, 38, 99999);
                GivePlayerWeapon(i, 1, 99999);
                GivePlayerWeapon(i, 8, 99999);
                GivePlayerWeapon(i, 13, 99999);
                GivePlayerWeapon(i, 16, 99999);
                GivePlayerWeapon(i, 24, 99999);
                GivePlayerWeapon(i, 26, 99999);
                GivePlayerWeapon(i, 28, 99999);
                GivePlayerWeapon(i, 31, 99999);
                GivePlayerWeapon(i, 34, 99999);
                GivePlayerWeapon(i, 43, 99999);
                SetPlayerArmour(i, 100.0);
                GivePlayerMoney(i, 50000);
                SendClientMessage(i, COLOR_WHITE,"[INFO] E tambйm recebeu o seu kit Administrador. Com vбrias armas e mais $50 Mil.");
            }
        }
    }
    return 1;
}
pawn Код:
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : warning: 225: unreachable code
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 004: function "OnPlayerUpdate" is not implemented
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 017: undefined symbol "playerid"
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 017: undefined symbol "playerid"
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 017: undefined symbol "playerid"
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 017: undefined symbol "playerid"
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 017: undefined symbol "playerid"
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : warning: 225: unreachable code
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 004: function "OnPlayerStreamIn" is not implemented
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : warning: 225: unreachable code
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 004: function "OnPlayerStreamOut" is not implemented
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : warning: 225: unreachable code
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 004: function "OnVehicleStreamIn" is not implemented
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : warning:
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : warning: 225: unreachable code
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 004: function "OnVehicleStreamOut" is not implemented
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 079: inconsistent return types (array & non-array)
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : warning: 225: unreachable code
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 029: invalid expression, assumed zero
E:\0.3c\0.3c\samp03csvr_win32\gamemodes\4Fun.pwn(1173) : error: 004: function "OnDialogResponse" is not implemented