[AJUDA] OnRconLoginAttemp
#1

Entao galerinha eu catei esse code aki pra se errar tres vezes a senha da rcon seria banido! mais deu uns errinho vejam ele ae

Код:
public OnRconLoginAttemp( ip[], password[], sucess )
{
   if( !sucess )
   {
      new kIP[ 16 ];
      for( new playerid; playerid <= MAX_PLAYERS; playerid++ )
      {
         GetPlayerIp( playerid, kIP, sizeof( kIP ) );
         if( !strcmp( ip, kIP, true ) )
         {
            SendClientMessage( playerid, -1, "[RCON] Senha errada, se errar 3 vezes serб banido!" );
            SetPVarInt( playerid, "kTent", GetPVarInt( playerid, "kTen" ) + 1 )

            if( GetPVarInt( playerid, "kTent" ) == 3 ) return Ban( playerid );
         }
      }
   }
   return true;
}
й esse ai em cima.. agora veja os erros..

Код:
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(4816) : warning 235: public function lacks forward declaration (symbol "OnRconLoginAttemp")
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(4827) : error 017: undefined symbol "SetPVarInt"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(4829) : error 001: expected token: ";", but found "if"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(4829) : error 017: undefined symbol "GetPVarInt"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
oque eu faзo
Reply
#2

Esse cуdigo foi feito por mim, e o erro й ter "sucess" e o certo й "sucess", enganei-me na altura.
PHP код:
public OnRconLoginAttempt(ip[], password[], success
{
   new 
IP16 ]; 
   if( !
success 
   { 
      for( new 
playeridplayerid <= MAX_PLAYERSplayerid++ ) 
      { 
         
GetPlayerIpplayeridIPsizeofIP ) ); 
         if( !
strcmpipIPtrue ) ) 
         { 
            
SendClientMessageplayeridVermelho"[RCON] Senha errada, se errar 3 vezes serб banido!" ); 
            
SetPVarIntplayerid"kTent"GetPVarIntplayerid"kTent" ) + ) ;
            if( 
GetPVarIntplayerid"kTent" ) == )
            return 
Banplayerid );
         } 
      } 
   } 
   return 
true

Se der erro, й o seu include <a_samp> que nгo estб atualizado.
Reply
#3

Quote:
Originally Posted by The Knight
Посмотреть сообщение
Esse cуdigo foi feito por mim, e o erro й ter "sucess" e o certo й "sucess", enganei-me na altura.
Errou atй na hora de escrever ^^
O erro й ter usado "sucess" ao invйs de "success", corrigido :P
Mas o CODE tб correto.
Reply
#4

Quote:
Originally Posted by The Knight
Посмотреть сообщение
Esse cуdigo foi feito por mim, e o erro й ter "sucess" e o certo й "sucess", enganei-me na altura.
PHP код:
public OnRconLoginAttempt(ip[], password[], success
{
   new 
IP16 ]; 
   if( !
success 
   { 
      for( new 
playeridplayerid <= MAX_PLAYERSplayerid++ ) 
      { 
         
GetPlayerIpplayeridIPsizeofIP ) ); 
         if( !
strcmpipIPtrue ) ) 
         { 
            
SendClientMessageplayeridVermelho"[RCON] Senha errada, se errar 3 vezes serб banido!" ); 
            
SetPVarIntplayerid"kTent"GetPVarIntplayerid"kTent" ) + ) ;
            if( 
GetPVarIntplayerid"kTent" ) == )
            return 
Banplayerid );
         } 
      } 
   } 
   return 
true

Se der erro, й o seu include <a_samp> que nгo estб atualizado.
DESCULPE A DEMORA PARA RESPONDER! MAS Й PQ FIKEI SEM NET ¬¬

olha deu esses ERROS

Код:
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(4906) : error 017: undefined symbol "SetPVarInt"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(4908) : error 017: undefined symbol "GetPVarInt"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#5

Poe isto no topo do GM:

PHP код:
#include <a_players> 
Reply
#6

mesma coisa '-'
Reply
#7

@Shadoww5
Nгo tem necessidade nenhuma de usar include a_players, o prфprio a_samp jб lк.

@Topic
Atualize os seus includes!
Reply
#8

coloque no GM
pawn Код:
native SetPVarInt(playerid, varname[], int_value);
native GetPVarInt(playerid, varname[]);
Reply
#9

Quote:
Originally Posted by [S]trong
Посмотреть сообщение
coloque no GM
pawn Код:
native SetPVarInt(playerid, varname[], int_value);
native GetPVarInt(playerid, varname[]);
DEU CERTO VALEU '-'

TOPICO RESOLVIDO!
Reply
#10

Ah tah ... Pensei que o "SetPVarInt" era somente da include "a_players".
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)