SA-MP Forums Archive
[Ajuda] GameMode - 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] GameMode (/showthread.php?tid=495096)



GameMode - MorreJaa - 15.02.2014

Como tirar protecзгo do gamemode playhard? ao ligar diz que nгo tenho permissгo para ligar, vou ao gm encontro isto

pawn Код:
AntiDeAMX()
{
    new a[][] =
    {
        "Unarmed (Fist)",
        "Brass K"
    };
    #pragma unused a
}
#define BlockFile                   "Contas/ThE_pAszvez12.ini"
pawn Код:
public OnGameModeInit()
{
    AntiDeAMX();
 #if PROTECTED == 1
    {
        new ServerIP[20], ServerPort;

        GetServerVarAsString("bind",ServerIP,20);
        ServerPort = GetServerVarAsInt("port");

        if(strcmp(ServerIP,PROTECTED_IP,false) != 0 || !strlen(ServerIP)) // Check server IP.
        {
            print("1This server has not the permission to use this gamemode..");
            print("Server shutting down in 5 seconds");
            SetTimer("Exit",5000,false);

            return 0;
        }
        else if(ServerPort != PROTECTED_PORT) // If  server port is different, end server.
        {
            print("2This server has not the permission to use this gamemode.");
            print("Server shutting down in 5 seconds");
            SetTimer("Exit",5000,false);
            return 0;
        }
    }
    #endif
alguem me ajuda?


Re: GameMode - Dieguinho - 16.02.2014

remova esta parte

pawn Код:
#if PROTECTED == 1
    {
        new ServerIP[20], ServerPort;

        GetServerVarAsString("bind",ServerIP,20);
        ServerPort = GetServerVarAsInt("port");

        if(strcmp(ServerIP,PROTECTED_IP,false) != 0 || !strlen(ServerIP)) // Check server IP.
        {
            print("1This server has not the permission to use this gamemode..");
            print("Server shutting down in 5 seconds");
            SetTimer("Exit",5000,false);

            return 0;
        }
        else if(ServerPort != PROTECTED_PORT) // If  server port is different, end server.
        {
            print("2This server has not the permission to use this gamemode.");
            print("Server shutting down in 5 seconds");
            SetTimer("Exit",5000,false);
            return 0;
        }
    }
    #endif

e a definiзгo de" PROTECTED "

e tambйm deletar a public Exit


Re: GameMode - MorreJaa - 16.02.2014

Public Exit? nгo tem essa public mano


Re: GameMode - zSuYaNw - 16.02.2014

procura por:

pawn Код:
#define PROTECTED  true
e substitui por

pawn Код:
#define PROTECTED false



Re: GameMode - MorreJaa - 16.02.2014

so aparece

pawn Код:
#define PROTECTED  1
se meter 0 o samp server nao abre, e se meter false tambem nгo abre :S


Re: GameMode - zSuYaNw - 16.02.2014

Tentas excluir esta linha


Re: GameMode - MorreJaa - 16.02.2014

Jб exclui o que o Dieguinho disse, so nгo encontrei a public Exit que ele falou, de resto apaguei e o samp server nao abre


Re: GameMode - davi54723 - 16.02.2014

#define PROTECTED 1?
Entгo coloque:
#define PROTECTED 0


Explicaзгo:
True й a mesma coisa que 1;
0 й a mesma coisa que false.

1 = True
0 = False.

E outra, procura por algo tipo:
EXIT

Tipo isso:

Public Exit

E apague, caso nгo tenha, compile sem mesmo, e reinicie o servidor.


Re: GameMode - MorreJaa - 16.02.2014

Hummmm

Quote:
Originally Posted by davi54723
Посмотреть сообщение
#define PROTECTED 1?
Entгo coloque:
#define PROTECTED 0


Explicaзгo:
True й a mesma coisa que 1;
0 й a mesma coisa que false.

1 = True
0 = False.

E outra, procura por algo tipo:
EXIT

Tipo isso:

Public Exit

E apague, caso nгo tenha, compile sem mesmo, e reinicie o servidor.
Quote:
Originally Posted by MorreJaa
Посмотреть сообщение
so aparece

Lк bem o que eu disse :P

pawn Код:
#define PROTECTED  1
se meter 0 o samp server nao abre, e se meter false tambem nгo abre :S



Re: GameMode - MorreJaa - 17.02.2014

#UP Tуpico ficando esquecido...

alguem ajuda?