[Ajuda] Servidor crashando com 10 minutos de jogo
#1

Samp Server crasha dps de 10 minutos que eu entro, meu GM:
Код:
#include <a_samp>
#include <DOF2>
#include <zcmd>

//Dialogs
#define DIALOG_REGISTRO 0
#define DIALOG_LOGIN    1
#define DIALOG_SEXO     2

//Cores
#define COR_VERMELHO    0xFF0000AA

//Variaveis e Enums
enum Info
{
	Senha,
	Profissao,
	Dinheiro,
	bool:LicencaTerrestre,
	bool:LicencaAerea,
	bool:LicencaArmas,
	Skin,
	Admin
}
new Jogador[MAX_PLAYERS][Info];
new txtRegistro[150] = "{FFFFFF}Bem-vindo ao {00FF00}Brasil {FFFF00}Play {0000FF}Now\n{FFFFFF}Digite uma senha abaixo para se registrar:";
new txtLogin[200] = "{FFFFFF}Bem-vindo ao {00FF00}Brasil {FFFF00}Play {0000FF}Now\n{FFFFFF}Digite sua senha abaixo para se logar:";
new txtSexo[100] = "{FFFFFF}Escolha o seu sexo abaixo:";

//Stocks
stock PegarNome(playerid)
{
	new nome[MAX_PLAYER_NAME];
	GetPlayerName(playerid, nome, sizeof(nome));
	return nome;
}

stock Arquivo(playerid)
{
	new arquivo[60];
	format(arquivo, sizeof(arquivo), "Contas/%s.ini", PegarNome(playerid));
	return arquivo;
}

stock SalvarDados(playerid)
{
	Jogador[playerid][Dinheiro] = GetPlayerMoney(playerid);
	Jogador[playerid][Skin] = GetPlayerSkin(playerid);
	DOF2_SetInt(Arquivo(playerid), "Profissao", Jogador[playerid][Profissao]);
	DOF2_SetInt(Arquivo(playerid), "Dinheiro", Jogador[playerid][Dinheiro]);
	DOF2_SetBool(Arquivo(playerid), "LicencaTerrestre", Jogador[playerid][LicencaTerrestre]);
	DOF2_SetBool(Arquivo(playerid), "LicencaAerea", Jogador[playerid][LicencaAerea]);
	DOF2_SetBool(Arquivo(playerid), "LicencaArmas", Jogador[playerid][LicencaArmas]);
	DOF2_SetInt(Arquivo(playerid), "Skin", Jogador[playerid][Skin]);
	DOF2_SetInt(Arquivo(playerid), "Admin", Jogador[playerid][Admin]);
	DOF2_SaveFile();
}

stock CarregarPickups()
{
	CreatePickup(1239, 1, 1481.1130, -1771.3099, 18.7958, -1); // Prefeitura
	Create3DTextLabel("Prefeitura\nAperte F ou ENTER para entrar", 0xFFFFFFFF, 1481.1130, -1771.3099, 18.7958, 6.0, 0, 0); // Prefeitura

	CreatePickup(1247, 1, 1555.3198,-1675.6238,16.1953, -1); // Delegacia
	Create3DTextLabel("Delegacia\nAperte F ou ENTER para entrar", 0xFFFFFFFF, 1555.3198,-1675.6238,16.1953, 6.0, 0, 0); // Delegacia

	CreatePickup(1239, 1, 1352.4617,-1758.5986,13.5078, -1); // 24/7
	Create3DTextLabel("24/7\nAperte F ou ENTER para entrar", 0xFFFFFFFF, 1352.4617,-1758.5986,13.5078, 6.0, 0, 0); // 24/7

	CreatePickup(1242, 1, 1368.5728,-1279.6954,13.5469, -1); // Ammu Nation
	Create3DTextLabel("Ammu Nation\nAperte F ou ENTER para entrar", 0xFFFFFFFF, 1368.5728,-1279.6954,13.5469, 6.0, 0, 0); // Ammu Nation

	CreatePickup(1274, 1, 1462.2185,-1012.2582,26.8438, -1); // Banco
	Create3DTextLabel("Banco\nAperte F ou ENTER para entrar", 0xFFFFFFFF, 1462.2185,-1012.2582,26.8438, 6.0, 0, 0); // Banco

	CreatePickup(1275, 1, 2244.4019,-1665.5691,15.4766, -1); // Binco
	Create3DTextLabel("Binco\nAperte F ou ENTER para entrar", 0xFFFFFFFF, 2244.4019,-1665.5691,15.4766, 6.0, 0, 0); // Binco

	// Pickups na saida dos locais
	CreatePickup(1318, 1, 390.7658,173.7874,1008.3828, -1); // Prefeitura
	CreatePickup(1318, 1, 246.9131,62.6461,1003.6406, -1); // Delegacia
	CreatePickup(1318, 1, 6.0132,-30.9611,1003.5494, -1); // 24/7
 	CreatePickup(1318, 1, 315.6062,-142.9970,999.6016, -1); // Ammu Nation
 	CreatePickup(1318, 1, 2315.4590,-0.2173,26.7422, -1); // Banco
 	CreatePickup(1318, 1, 207.7806,-110.8337,1005.1328, -1); // Binco
}

stock CarregarMapa()
{
    // Objetos do Spawn Civil
	CreateObject(640, 1366.40, -1891.40, 13.22,   0.00, 0.00, 0.00);
	CreateObject(640, 1366.40, -1885.72, 13.22,   0.00, 0.00, 0.00);
	CreateObject(640, 1366.43, -1897.25, 13.22,   0.00, 0.00, 0.00);
	CreateObject(3508, 1366.11, -1881.72, 12.50,   0.00, 0.00, 0.00);
	CreateObject(3508, 1366.18, -1901.30, 12.50,   0.00, 0.00, 0.00);
	CreateObject(1340, 1378.68, -1890.58, 13.65,   0.00, 0.00, 179.28);
	// Veнculos do Spawn Civil
	CreateVehicle(462, 1395.9464, -1893.4532, 12.9765, 90.0000, -1, -1, 120);
	CreateVehicle(462, 1395.9847, -1899.1812, 12.9765, 90.0000, -1, -1, 120);
	CreateVehicle(462, 1395.9655, -1896.2584, 12.9765, 90.0000, -1, -1, 120);
	CreateVehicle(462, 1396.0024, -1901.8083, 12.9765, 90.0000, -1, -1, 120);
	CreateVehicle(481, 1381.0035, -1893.8224, 13.2958, 180.0000, -1, -1, 120);
	CreateVehicle(481, 1385.4751, -1893.8792, 13.2958, 180.0000, -1, -1, 120);
	CreateVehicle(481, 1383.2634, -1893.8282, 13.2958, 180.0000, -1, -1, 120);
	CreateVehicle(481, 1387.6675, -1893.9294, 13.2958, 180.0000, -1, -1, 120);
	CreateVehicle(481, 1390.2076, -1893.9879, 13.2958, 180.0000, -1, -1, 120);
	//-----------------------------------------------------------------------------//
	// Objetos da HQ Policial
	CreateObject(975, 1589.04, -1637.99, 14.00,   0.00, 0.00, 0.00);
	CreateObject(2930, 1584.24, -1638.04, 15.02,   0.00, 0.00, 269.88);
	CreateObject(986, 1539.65, -1613.79, 14.77,   0.00, 0.00, 90.00);
	CreateObject(986, 1559.78, -1602.50, 14.77,   0.00, 0.00, 0.00);
	CreateObject(986, 1539.63, -1606.37, 14.77,   0.00, 0.00, 90.00);
	CreateObject(986, 1543.77, -1602.45, 14.77,   0.00, 0.00, 0.00);
	CreateObject(986, 1551.83, -1602.44, 14.77,   0.00, 0.00, 0.00);
	CreateObject(986, 1575.60, -1602.42, 14.76,   0.00, 0.00, 359.80);
	CreateObject(986, 1567.62, -1602.49, 14.77,   0.00, 0.00, 0.00);
	CreateObject(986, 1583.59, -1602.41, 14.76,   0.00, 0.00, 359.80);
	CreateObject(986, 1591.55, -1602.47, 14.76,   0.00, 0.00, 359.60);
	CreateObject(986, 1607.89, -1614.57, 14.76,   0.00, 0.00, 90.20);
	CreateObject(986, 1599.58, -1602.42, 14.76,   0.00, 0.00, 359.60);
	CreateObject(986, 1608.07, -1606.59, 14.76,   0.00, 0.00, 90.00);
	CreateObject(986, 1608.02, -1622.56, 14.76,   0.00, 0.00, 90.20);
	CreateObject(986, 1608.01, -1630.52, 14.76,   0.00, 0.00, 90.20);
	CreateObject(986, 1604.02, -1637.93, 13.32,   0.00, 0.00, 0.32);
	CreateObject(986, 1607.97, -1633.95, 14.76,   0.00, 0.00, 90.20);
	CreateObject(986, 1604.10, -1602.46, 14.76,   0.00, 0.00, 359.60);
}

// Comandos

CMD:entrar(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 1481.1130, -1771.3099, 18.7958)) // Prefeitura
    {
		SetPlayerInterior(playerid,3);
		SetPlayerPos(playerid,390.7658,173.7874,1008.3828);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1555.3198,-1675.6238,16.1953)) // Delegacia
    {
	    SetPlayerPos(playerid, 246.9131,62.6461,1003.6406);
	    SetPlayerInterior(playerid, 6);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1352.4617,-1758.5986,13.5078)) // 24/7
    {
        SetPlayerPos(playerid, 6.0132,-30.9611,1003.5494);
        SetPlayerInterior(playerid, 10);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1368.5728,-1279.6954,13.5469)) // Ammu Nation
    {
        SetPlayerPos(playerid, 315.6062,-142.9970,999.6016);
        SetPlayerInterior(playerid, 7);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1462.2185,-1012.2582,26.8438)) // Banco
    {
        SetPlayerPos(playerid, 2315.4590,-0.2173,26.7422);
        SetPlayerInterior(playerid, 0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2244.4019,-1665.5691,15.4766)) // Binco
    {
        SetPlayerPos(playerid, 207.7806,-110.8337,1005.1328);
        SetPlayerInterior(playerid, 15);
    }
	return 1;
}

CMD:sair(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 390.7658,173.7874,1008.3828)) // Prefeitura
    {
		SetPlayerInterior(playerid, 0);
		SetPlayerPos(playerid, 1481.1130, -1771.3099, 18.7958);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 246.9131,62.6461,1003.6406)) // Delegacia
    {
	    SetPlayerPos(playerid, 1555.3198,-1675.6238,16.1953);
	    SetPlayerInterior(playerid, 0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 6.0132,-30.9611,1003.5494)) // 24/7
    {
        SetPlayerPos(playerid, 1352.4617,-1758.5986,13.5078);
        SetPlayerInterior(playerid, 0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 315.6062,-142.9970,999.6016)) // Ammu Nation
    {
        SetPlayerPos(playerid, 1368.5728,-1279.6954,13.5469);
        SetPlayerInterior(playerid, 0);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2315.4590,-0.2173,26.7422)) // Banco
    {
        SetPlayerPos(playerid, 1462.2185,-1012.2582,26.8438);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 207.7806,-110.8337,1005.1328)) // Binco
    {
        SetPlayerPos(playerid, 2244.4019,-1665.5691,15.4766);
        SetPlayerInterior(playerid, 0);
    }
	return 1;
}

main()
{

}

public OnGameModeInit()
{
	CarregarMapa();
	CarregarPickups();
	DisableInteriorEnterExits();
	SetGameModeText("BPN GameMode");
	AddPlayerClass(0, 1390.1633,-1896.9985,13.4939,86.7470, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	DOF2_Exit();
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 0;
}

public OnPlayerConnect(playerid)
{
	if(!DOF2_FileExists(Arquivo(playerid))) ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registre-se", txtRegistro, "Confirmar", "Cancelar");
	else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logue-se", txtLogin, "Confirmar", "Cancelar");
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	SalvarDados(playerid);
	return 1;
}

public OnPlayerSpawn(playerid)
{
	SetPlayerSkin(playerid, DOF2_GetInt(Arquivo(playerid), "Skin"));
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	switch(dialogid)
	{
	    case DIALOG_REGISTRO:
	    {
	        if(!response) return Kick(playerid);
	        else
	        {
	            if(!strlen(inputtext))
	            {
					SendClientMessage(playerid, COR_VERMELHO,"ERRO: Digite algo no campo abaixo para se registrar!");
					ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registre-se", txtRegistro, "Confirmar", "Cancelar");
				}
	            else
	            {
	                if(strlen(inputtext) < 4 || strlen(inputtext) > 16)
	                {
						SendClientMessage(playerid, COR_VERMELHO,"ERRO: Senha muito curta ou muito grande!");
						ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registre-se", txtRegistro, "Confirmar", "Cancelar");
					}
					else
					{
					    DOF2_CreateFile(Arquivo(playerid));
					    DOF2_SetString(Arquivo(playerid), "Senha", inputtext);
					    GivePlayerMoney(playerid, 10000);
					    SalvarDados(playerid);
					    ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_MSGBOX, "Sexo", txtSexo, "Masculino", "Feminino");
					}
				}
	        }
	    }
	    case DIALOG_LOGIN:
	    {
			if(!response) return Kick(playerid);
			else
			{
			    if(!strlen(inputtext))
			    {
					SendClientMessage(playerid, COR_VERMELHO,"ERRO: Senha incorreta");
					ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logue-se", txtLogin, "Confirmar", "Cancelar");
				}
				else
				{
				    if(!strcmp(inputtext, DOF2_GetString(Arquivo(playerid), "Senha"), false))
				    {
						GivePlayerMoney(playerid, DOF2_GetInt(Arquivo(playerid), "Dinheiro"));
						SetSpawnInfo(playerid, 0, DOF2_GetInt(Arquivo(playerid), "Skin"), 1390.1633,-1896.9985,13.4939,86.7470, 0, 0, 0, 0, 0, 0);
						SpawnPlayer(playerid);
				    }
				    else
				    {
				        SendClientMessage(playerid, COR_VERMELHO,"ERRO: Senha incorreta");
						ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logue-se", txtLogin, "Confirmar", "Cancelar");
				    }
				}
			}
	    }
		case DIALOG_SEXO:
		{
  			if(response)
  			{
			  SetSpawnInfo(playerid, 0, 60, 1390.1633,-1896.9985,13.4939,86.7470, 0, 0, 0, 0, 0, 0);
              SpawnPlayer(playerid);
			  SalvarDados(playerid);
			}
	    	else
			{
				SetSpawnInfo(playerid, 0, 56, 1390.1633,-1896.9985,13.4939,86.7470, 0, 0, 0, 0, 0, 0);
				SpawnPlayer(playerid);
				SalvarDados(playerid);
			}
		}
	}
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == KEY_SECONDARY_ATTACK)
	{
	    cmd_entrar(playerid);
	    cmd_sair(playerid);
	}
	return 1;
}
Meu fs de GPS:
Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#define DIALOG_GPS  				3
#define DIALOG_GPS_IMPORTANTES 		4
#define DIALOG_GPS_HQS	            5
#define DIALOG_GPS_TERRITORIOS      6
#define DIALOG_GPS_OUTROS           7

#if defined FILTERSCRIPT

CMD:gps(playerid)
{
	ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "GPS", "{FFFFFF}Locais importantes\nHQ's\nTerritуrios\nOutros", "Ok", "Fechar");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_GPS)
	{
	    if(response)
	    {
		    switch(listitem)
		    {
		        case 0: // Locais importantes
		        {
		            ShowPlayerDialog(playerid, DIALOG_GPS_IMPORTANTES, DIALOG_STYLE_LIST, "GPS", "{FFFFFF}Prefeitura\nDelegacia\n24/7\nAmmu Nation\nBanco\nLoja de roupas Binco\nAluguel de carros\nAcademia", "Ok", "Voltar");
		        }
		        case 1: // HQ's
		        {

		        }
		        case 2: // Territуrios
		        {

		        }
		        case 3: // Outros
		        {
                    ShowPlayerDialog(playerid, DIALOG_GPS_OUTROS, DIALOG_STYLE_LIST, "GPS", "{FFFFFF}Alhambra\nIgreja\nPraia", "Ok", "Voltar");
		        }
		    }
	    }
	}
	else if(dialogid == DIALOG_GPS_IMPORTANTES)
	{
	    if(response)
	    {
		    switch(listitem)
		    {
		        case 0: // Prefeitura
		        {
		            SetPlayerCheckpoint(playerid, 1481.1130,-1771.3099,18.7958, 3.0);
		            GameTextForPlayer(playerid, "Prefeitura marcada no mapa!", 5000, 5);
		        }
	            case 1: // Delegacia
		        {
	                SetPlayerCheckpoint(playerid, 1555.3198,-1675.6238,16.1953, 3.0);
	                GameTextForPlayer(playerid, "Delegacia marcada no mapa!", 3000, 5);
		        }
		        case 2: // 24/7
		        {
	                SetPlayerCheckpoint(playerid, 1352.4617,-1758.5986,13.5078, 3.0);
	                GameTextForPlayer(playerid, "24/7 marcado no mapa!", 3000, 5);
		        }
		        case 3: // Ammu Nation
		        {
	             	SetPlayerCheckpoint(playerid, 1368.5728,-1279.6954,13.5469, 3.0);
	             	GameTextForPlayer(playerid, "Ammu Nation marcada no mapa!", 3000, 5);
		        }
		        case 4: // Banco
		        {
		            SetPlayerCheckpoint(playerid, 1462.2185,-1012.2582,26.8438, 3.0);
	             	GameTextForPlayer(playerid, "Banco marcado no mapa!", 3000, 5);
		        }
		        case 5: // Loja de roupas binco
		        {
		            SetPlayerCheckpoint(playerid, 2244.4019,-1665.5691,15.4766, 3.0);
	             	GameTextForPlayer(playerid, "Binco marcada no mapa!", 3000, 5);
		        }
		        case 6: // Aluguel de carros
		        {
		            SetPlayerCheckpoint(playerid, 556.5563,-1257.3440,17.2422, 3.0);
	             	GameTextForPlayer(playerid, "Aluguel de carros marcado no mapa!", 3000, 5);
   				}
   				case 7: // Academia
   				{
   				    SetPlayerCheckpoint(playerid, 2218.9915,-1723.0466,13.3984, 3.0);
	             	GameTextForPlayer(playerid, "Academia marcada no mapa!", 3000, 5);
   				}
		    }
	    }
	    else ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "GPS", "{FFFFFF}Locais importantes\nHQ's\nTerritуrios\nOutros", "Ok", "Fechar");
	}
	else if(dialogid == DIALOG_GPS_HQS)
	{
	    if(response)
	    {
	    
	    }
	    else ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "GPS", "{FFFFFF}Locais importantes\nHQ's\nTerritуrios\nOutros", "Ok", "Fechar");
	}
    else if(dialogid == DIALOG_GPS_TERRITORIOS)
	{
	    if(response)
	    {

	    }
	    else ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "GPS", "{FFFFFF}Locais importantes\nHQ's\nTerritуrios\nOutros", "Ok", "Fechar");
	}
	else if(dialogid == DIALOG_GPS_OUTROS)
	{
	    if(response)
	    {
			if(listitem == 0) // Alhambra
			{
			    SetPlayerCheckpoint(playerid, 1836.5270,-1682.0714,13.3442, 3.0);
   				GameTextForPlayer(playerid, "Alhambra marcada no mapa!", 3000, 5);
			}
			else if(listitem == 1) // Igreja
			{
				SetPlayerCheckpoint(playerid, 2232.9951,-1333.5342,23.9816, 3.0);
   				GameTextForPlayer(playerid, "Igreja marcada no mapa!", 3000, 5);
			}
			else if(listitem == 2) // Praia
			{
			    SetPlayerCheckpoint(playerid, 831.1398,-1797.7688,13.6185, 3.0);
   				GameTextForPlayer(playerid, "Praia marcada no mapa!", 3000, 5);
			}
    	}
	    else ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "GPS", "{FFFFFF}Locais importantes\nHQ's\nTerritуrios\nOutros", "Ok", "Fechar");
	}
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    DisablePlayerCheckpoint(playerid);
    return 1;
}

#endif
Tentei baixar o creashdetect porйm o link n ta funcionando
Reply


Messages In This Thread
Servidor crashando com 10 minutos de jogo - by SouLMito - 15.12.2012, 17:32
Re: Servidor crashando com 10 minutos de jogo - by JonathanFeitosa - 15.12.2012, 17:38
Re: Servidor crashando com 10 minutos de jogo - by SouLMito - 15.12.2012, 17:40
Re: Servidor crashando com 10 minutos de jogo - by SouLMito - 15.12.2012, 18:49
Re: Servidor crashando com 10 minutos de jogo - by SouLMito - 15.12.2012, 20:25
Re: Servidor crashando com 10 minutos de jogo - by dPlaYer_ - 15.12.2012, 20:40

Forum Jump:


Users browsing this thread: 2 Guest(s)