[Ajuda] Filterscripts crashando
#1

Quando coloco dois FilterScripts juntos eles crasham o server depois de 1 ou 2 minutos

1° FS:
Код:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	// 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);

	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#endif
2° FS:
Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#if defined FILTERSCRIPT

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, 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;
}

public OnFilterScriptInit()
{
	// Pickups e Labels na entrada dos locais
	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
	
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == KEY_SECONDARY_ATTACK)
	{
	    cmd_entrar(playerid);
	    cmd_sair(playerid);
	}
	return 1;
}

#endif
Reply
#2

Nгo e mais facil botar no gamemode achara o erro mais facil!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)