SA-MP Forums Archive
[Ayuda] Como dar comando a 2 equipos - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] Como dar comando a 2 equipos (/showthread.php?tid=283380)



[Ayuda] Como dar comando a 2 equipos - Manuel7284 - 14.09.2011

hola alguien me puede ayudar a poner un comando que funcione en 2 equipos?
asi lo tengo yo:

Quote:

if(strcmp(cmd, "/gate", true) == 0)
{
if(gTeam[playerid] == TEAM_ARMY)
{

Donde dice Team Army quiero agregar a otro team! es TEAM_ADMIN osea que: TEAM_ARMY Y TEAM_ADMIN puedan poner ese comando alguien me puede ayudar?


Respuesta: [Ayuda] Como dar comando a 2 equipos - M1tux3r - 14.09.2011

Usa esto:
pawn Код:
if(strcmp(cmd, "/gate", true) == 0)
{
    if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_ADMIN)
    {
    }
    return 1;
}



Respuesta: [Ayuda] Como dar comando a 2 equipos - Manuel7284 - 14.09.2011

no funciono aca le paso el comando completo:


Код:
	if(strcmp(cmd, "/gate", true) == 0)
	{
 		if(gTeam[playerid] == TEAM_ARMY)
		{
	        if(PlayerToPoint(25.0, playerid,2720.827,-2414.449,13.46094))
	        {
	            if(ArmyGateStatus == 0)
	            {
					MoveObject(igate2,2720.827,-2414.449,13.46094,3.0);
					GameTextForPlayer(playerid,"~w~Gate Opening, please wait...",4000,3);
					ArmyGateStatus = 1; //i.e open
				}
				else
				{
				    MoveObject(igate2,2720.827,-2405.449,13.46094,2.5);
				   	GameTextForPlayer(playerid,"~w~Gate Closing, please wait...",4000,3);
				   	ArmyGateStatus = 0;
				}
			}
	        else SendClientMessage(playerid,COLOR_RED,"You need to be near the gate to move it");
		}



Respuesta: [Ayuda] Como dar comando a 2 equipos - Voychuk - 14.09.2011

pawn Код:
if(strcmp(cmd, "/gate", true) == 0)
    {
        if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_ADMIN) //Como bien dijo m1tux3r
        {
            if(PlayerToPoint(25.0, playerid,2720.827,-2414.449,13.46094))
            {
                if(ArmyGateStatus == 0)
                {
                    MoveObject(igate2,2720.827,-2414.449,13.46094,3.0);
                    GameTextForPlayer(playerid,"~w~Gate Opening, please wait...",4000,3);
                    ArmyGateStatus = 1; //i.e open
                }
                else
                {
                    MoveObject(igate2,2720.827,-2405.449,13.46094,2.5);
                    GameTextForPlayer(playerid,"~w~Gate Closing, please wait...",4000,3);
                    ArmyGateStatus = 0;
                }
            }
            else SendClientMessage(playerid,COLOR_RED,"You need to be near the gate to move it");
        }
o Prueba(No creo que funcione)
pawn Код:
if(strcmp(cmd, "/gate", true) == 0)
    {
        if(gTeam[playerid] == TEAM_ARMY || TEAM_ADMIN)
        {
            if(PlayerToPoint(25.0, playerid,2720.827,-2414.449,13.46094))
            {
                if(ArmyGateStatus == 0)
                {
                    MoveObject(igate2,2720.827,-2414.449,13.46094,3.0);
                    GameTextForPlayer(playerid,"~w~Gate Opening, please wait...",4000,3);
                    ArmyGateStatus = 1; //i.e open
                }
                else
                {
                    MoveObject(igate2,2720.827,-2405.449,13.46094,2.5);
                    GameTextForPlayer(playerid,"~w~Gate Closing, please wait...",4000,3);
                    ArmyGateStatus = 0;
                }
            }
            else SendClientMessage(playerid,COLOR_RED,"You need to be near the gate to move it");
        }



Respuesta: [Ayuda] Como dar comando a 2 equipos - Manuel7284 - 14.09.2011

Perfecto Me Funciono Gracias!!! m1tux3r y los demas por su ayuda


Re: [Ayuda] Como dar comando a 2 equipos - jangel - 14.09.2011

Eso misno es lo que yo queria xD hoye we cuanto llevas en tu server heho aver si podemos ser socios