[Ajuda] Servidor Nгo Liga
#1

Olб Estou Criando uma GM do 0 e estou usando o SII para salvamento de Dados. O Sistema estб Pronto jб mais meu servidor nгo quer ligar olha aki o Code jб do sistema. Comeзei o criar o GameMode Hoje De Manha seguindo um tutorial.

pawn Code:
#include <a_samp>
#include <SII>


#define Dialog_Registro 1000
#define Dialog_Logar    1001

//Cores
#define AZULZAO  0x0067FFFF
#define ROSA     0xFF67FFFF
#define AZULBB   0x00FFFFFF
#define AMARELAO 0xFFFF00FF
#define VERDAO   0x00FF00FF
#define LILAS    0xABA7F7FF
#define VERMELHO 0xFF0000FF
#define BRANCO   0xFFFFFFFF

//News
new gPlayerName[MAX_PLAYERS][MAX_PLAYER_NAME];

//Enumeraзхes
enum pInfo
{
   pSenha,
   pScore,
   pDinheiro,
   pAdmin
}
new PlayerInfo[MAX_PLAYERS][pInfo];

//Stocks
stock ObterINI(playerid)
{
  new conta[64];
  format(conta,30,"Contas/%s.ini",gPlayerName[playerid]);
  return conta;
}


main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}


public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    GetPlayerName(playerid, gPlayerName[playerid], MAX_PLAYER_NAME);
    if (fexist(ObterINI(playerid)))
    {
        ShowPlayerDialog(playerid, Dialog_Registro, DIALOG_STYLE_INPUT,"Login","Digite sua senha abaixo para Logar.","Logar","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, Dialog_Registro, DIALOG_STYLE_INPUT,"Registrando","Digite sua senha abaixo para registrar uma nova conta.","Registrar","Quit");
    }
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
   {
       case Dialog_Registro:
       {
           if (!response) return Kick(playerid);
           if (response)
           {
              if(!strlen(inputtext)){
                ShowPlayerDialog(playerid, Dialog_Registro, DIALOG_STYLE_INPUT,"Registrando","Vocк Digitou Uma Senha Invalida Tente Novamente.","Registrar","Quit");
              }

              if(INI_Open(ObterINI(playerid))) {
              INI_WriteString("Senha",inputtext);
              INI_WriteInt("Score",1);
              INI_WriteInt("Dinheiro",2000);
              INI_WriteInt("Admin",0);

              INI_Save();
              INI_Close();

              ShowPlayerDialog(playerid, Dialog_Logar, DIALOG_STYLE_INPUT,"Logar","Digite sua senha abaixo para efetuar login.","Logar","Quit");
            }
        }
    }
        case Dialog_Logar:
        {
            if ( !response )return Kick(playerid);
            if ( response )
            {
                 if(!strlen(inputtext)){
                 ShowPlayerDialog(playerid, Dialog_Logar, DIALOG_STYLE_INPUT, "Logar","Vocк digitou uma senha invбlida Digite sua senha abaixo para efetuar login.","Logar","Quit");
                 }
                 
                 if(INI_Open(ObterINI(playerid))) {
                 INI_ReadString(PlayerInfo[playerid][pSenha],"Senha",20);
                 
                 if(strcmp(inputtext,PlayerInfo[playerid][pSenha],false)) {
                 ShowPlayerDialog(playerid, Dialog_Logar, DIALOG_STYLE_INPUT, "Logar","Vocк digitou uma senha incorreta Digite sua senha abaixo para Logar.","Logar","Quit");
                 }
                 
                 SetPlayerScore(playerid, INI_ReadInt("Score") );
                 ResetPlayerMoney(playerid);
                 GivePlayerMoney( playerid, INI_ReadInt( "Dinheiro" ) );
                 PlayerInfo[playerid][pAdmin] = INI_ReadInt("Admin");
                 INI_Close();
                 }
            }
        }
    }
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    if(INI_Open(ObterINI(playerid))) {

    INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt("Dinheiro",GetPlayerMoney(playerid));
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);

    INI_Save();
    INI_Close();
    }
    return 1;
}
Reply
#2

Se o GM compila sem problemas e o servidor nгo liga entгo o problema nгo й do GM... posta aqui o conteъdo do teu server_log.txt
Reply
#3

nao deves ter metido o nome do gm no server.cfg bem.
Reply
#4

ja consegui ligar e esta tudo funcionando corretamente. E ja ja irei apresentar meu projeto
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)