Pasar esto a ZCMD
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
		if (strcmp("/rayuntamiento", cmdtext, true) == 0) {
		{
		 if(IsPlayerConnected(playerid))
			{
				if(IsPlayerInRangeOfPoint(playerid,5, 1479.5304,-1768.7941,14.8198))
					{
						SetTimer("ayuntar1", 20000, 0);
						SetTimer("ayuntar2", 40000, 0);
						SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Comienzan las obras de reparaciуn del ayuntamiento.");
						return 1;
						}
					}
				else
				{
				SendClientMessage(playerid, COLOR_GRAD2, "No estбs en el lugar de los hechos");
				return 1;
				}
			}
		}
        if (strcmp("/atentado", cmdtext, true) == 0) {
		{
			if(IsPlayerConnected(playerid))
				{
					if(IsPlayerInRangeOfPoint(playerid,5, 1479.5304,-1768.7941,14.8198))
					{
						SetTimer("BombAyunta", 20000, 0);
						SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Una organizaciуn paramilitar activу una Bomba en el ayuntamiento.");
						SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Explotarб en aproximadamente 30 segundos, desalojen el бrea.");
					 	return 1;
						 }
					}
				}
			return 1;
		}
	return 0;
}
public BombAyunta()
{
CreateExplosion(1925.1090,158.5584,56.1953, 6, 50);
CreateExplosion(1484.4589,-1768.7817,21.9200, 0, 50);
CreateExplosion(1476.3575,-1768.7352,21.9200, 7, 50);
CreateExplosion(1467.2186,-1768.0676,15.1084, 1, 50);
CreateExplosion(1454.6178,-1775.9434,18.4791, 3, 50);
CreateExplosion(1445.8269,-1776.5107,23.1687, 4, 50);
CreateExplosion(1427.1674,-1773.4142,23.1687, 8, 50);
CreateExplosion(1479.5304,-1768.7941,14.8198, 13, 50);
CreateExplosion(1512.7782,-1776.5568,21.9200, 13, 50);
DestroyObject(bomb1);
DestroyObject(bomb2);
}
Reply
#2

Pon esto fuera de una callback
pawn Код:
CMD:rayuntamiento(playerid, params[])
        {
        #pragma unused params
         if(IsPlayerConnected(playerid))
            {
                if(IsPlayerInRangeOfPoint(playerid,5, 1479.5304,-1768.7941,14.8198))
                    {
                        SetTimer("ayuntar1", 20000, 0);
                        SetTimer("ayuntar2", 40000, 0);
                        SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Comienzan las obras de reparaciуn del ayuntamiento.");
                        return 1;
                        }
                    }
                else
                {
                SendClientMessage(playerid, COLOR_GRAD2, "No estбs en el lugar de los hechos");
                return 1;
                }
            }
        }
pawn Код:
CMD:atentado(playerid, params[])
        {
        #pragma unused params
        if(IsPlayerConnected(playerid))
            {
                if(IsPlayerInRangeOfPoint(playerid,5, 1479.5304,-1768.7941,14.8198))
                {
                    SetTimer("BombAyunta", 20000, 0);
                    SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Una organizaciуn paramilitar activу una Bomba en el ayuntamiento.");
                    SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Explotarб en aproximadamente 30 segundos, desalojen el бrea.");
                    return 1;
                                }
                }
            }
        return 1;
    }
Reply
#3

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\ayuntabomba.pwn(67) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\ayuntabomba.pwn(67) : error 017: undefined symbol "cmd_rayuntamiento"
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\ayuntabomba.pwn(67) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\ayuntabomba.pwn(67) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Es un FS, ahн pasarй el FS completo:

pawn Код:
//(=-=-=-=-=-=-=-=-=-=   Hecho por Micaela_Dia   =-=-=-=-=-=--=-=-=-=-=-=)//
//(                                                                     )//
//(             para la gente de http://www.pawnoscripting.com                 )//
//(                                                                     )//
//(         Gracia por todos los tutoriales y la buena onda             )//
//(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)//


#include <a_samp>
#include <zcmd>
#pragma tabsize 0
#define COLOR_GRAD2     0xBFC0C2FF
#define COLOR_AMARILLO  0xFFFF00AA

new bomb1;
new bomb2;
new bomb3;
new bomb4;
new bomb5;
new bomb6;

forward BombAyunta();
forward ayuntar1();
forward ayuntar2();

public OnFilterScriptInit()
{
    print("\n---------= Mi Primer Filterscrip =-------------");
    print("            [ -= By Micaela_Dia =- ]             ");
    print("     Gracias http://www.pawnoscripting.com        ");
    print("-----------------------------------------------\n");

    Create3DTextLabel("Ayuntamiento", 0xE8E202FF, 1477.6847,-1768.5623,15.4978, 32.0,0);

    return 1;
}
public OnPlayerConnect(playerid)
{
RemoveBuildingForPlayer(playerid, 4024, 1479.8672, -1790.3984, 56.0234, 0.25);
RemoveBuildingForPlayer(playerid, 4044, 1481.1875, -1785.0703, 22.3828, 0.25);
RemoveBuildingForPlayer(playerid, 1527, 1448.2344, -1755.8984, 14.5234, 0.25);
RemoveBuildingForPlayer(playerid, 4002, 1479.8672, -1790.3984, 56.0234, 0.25);
RemoveBuildingForPlayer(playerid, 3980, 1481.1875, -1785.0703, 22.3828, 0.25);
RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);
return 1;
}
public OnGameModeInit()
{
    bomb1 = CreateObject(10377, 1477.27, -1787.93, 30.74, 0.000000, 0.000000, 89.52);
    bomb2 = CreateObject(9241, 1450.01, -1792.97, 35.80,   0.00, 0.00, 180.15);

    //===================ayunta explotado=======================================
    CreateObject(10377, 1479.45, -1784.95, -2.33,   4.00, -42.00, 102.90);
    CreateObject(11428, 1462.99, -1782.47, 15.64,   0.00, 0.00, -93.12);
    CreateObject(11428, 1469.17, -1789.98, 17.02,   0.00, 0.00, -93.12);
    CreateObject(11428, 1451.49, -1793.08, 17.02,   0.00, 0.00, -111.54);
    CreateObject(11428, 1481.14, -1786.65, 17.02,   0.00, 0.00, -136.68);
    CreateObject(10985, 1497.75, -1787.71, 14.02,   0.00, 0.00, 343.32);
    CreateObject(3887, 1502.85, -1789.34, 16.05,   -33.00, 0.00, 98.00);
    CreateObject(3866, 1514.09, -1793.91, 12.92,   0.00, 19.00, 264.80);
    CreateObject(3866, 1441.73, -1791.07, 15.14,   0.00, 19.00, 0.00);
    CreateObject(3887, 1472.81, -1797.00, 8.93,   -33.00, 0.00, 262.76);
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
        CMD:rayuntamiento(playerid, params[])
        {
        #pragma unused params
         if(IsPlayerConnected(playerid))
            {
                if(IsPlayerInRangeOfPoint(playerid,5, 1479.5304,-1768.7941,14.8198))
                    {
                        SetTimer("ayuntar1", 20000, 0);
                        SetTimer("ayuntar2", 40000, 0);
                        SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Comienzan las obras de reparaciуn del ayuntamiento.");
                        return 1;
                        }
                    }
                else
                {
                SendClientMessage(playerid, COLOR_GRAD2, "No estбs en el lugar de los hechos");
                return 1;
                }
            }
        }
        CMD:atentado(playerid, params[])
        {
        #pragma unused params
        if(IsPlayerConnected(playerid))
            {
                if(IsPlayerInRangeOfPoint(playerid,5, 1479.5304,-1768.7941,14.8198))
                {
                    SetTimer("BombAyunta", 20000, 0);
                    SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Una organizaciуn paramilitar activу una Bomba en el ayuntamiento.");
                    SendClientMessage(playerid,COLOR_AMARILLO,"[SAMS] Explotarб en aproximadamente 30 segundos, desalojen el бrea.");
                    return 1;
                                }
                }
            }
        return 1;
    }
    return 0;
}
public BombAyunta()
{
CreateExplosion(1925.1090,158.5584,56.1953, 6, 50);
CreateExplosion(1484.4589,-1768.7817,21.9200, 0, 50);
CreateExplosion(1476.3575,-1768.7352,21.9200, 7, 50);
CreateExplosion(1467.2186,-1768.0676,15.1084, 1, 50);
CreateExplosion(1454.6178,-1775.9434,18.4791, 3, 50);
CreateExplosion(1445.8269,-1776.5107,23.1687, 4, 50);
CreateExplosion(1427.1674,-1773.4142,23.1687, 8, 50);
CreateExplosion(1479.5304,-1768.7941,14.8198, 13, 50);
CreateExplosion(1512.7782,-1776.5568,21.9200, 13, 50);
DestroyObject(bomb1);
DestroyObject(bomb2);
}
//respawn ayunta================================================================
public ayuntar1()
{
    bomb3 = CreateObject(10377, 1477.23, -1787.92, 14.61,   0.00, 0.00, 89.52);
    bomb4 = CreateObject(126, 1461.86, -1765.42, 13.56,   91.00, 0.00, 193.00);
    bomb5 = CreateObject(18248, 1502.68, -1775.04, 20.40,   0.00, 0.00, 330.19);
    bomb6 = CreateObject(18247, 1476.19, -1760.20, 17.37,   0.00, 0.00, 100.99);
    return 1;
}
//respawn ayunta================================================================
public ayuntar2()
{
    bomb1 = CreateObject(10377, 1477.27, -1787.93, 30.74, 0.000000, 0.000000, 89.52);
    bomb2 = CreateObject(9241, 1450.01, -1792.97, 35.80,   0.00, 0.00, 180.15);
    DestroyObject(bomb3);
    DestroyObject(bomb4);
    DestroyObject(bomb5);
    DestroyObject(bomb6);

    return 1;
}
//===================== Espero les Guste !!! ===================================
Utilizo la versiуn 0.3e
Reply
#4

Ponlo fuera de OnPlayerCommandText..
Lee algъn tutorial sobre ZCMD, no es tan difнcil, no esperes que te pasen todos los comandos..
Reply
#5

Me lo pasarнas, el [pawn*] del mismo fuera del OnPlayerCommandText?
Reply
#6

Existe un topic llamado Pedidos de Scripts, por favor utilizalo.

Tema Cerrado
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)