Como crear /equiipo.
#1

Bueno esto es algo facil para ustedes,pero para mi no,estoy aprendiendo.
Lo que pasa esque quiero poner el /equipo para otra faccion que no tiene
Код:
zcmd(equipo, playerid, params[])
	{
		if(Team_LSTV(playerid))
		{
		    if(PlayerToPoint(5, playerid, -2782.3835,273.8393,23.7078))
		    {
		        new cnn[] = "Seguridad\nPeriodista\nRopa Normal";
		        SafeDialogEx(playerid,EQUIPO_CNN,DIALOG_STYLE_LIST,">> LSTV <<",cnn,"Equipar","Cancelar");
		    }
		}
		if(Gobierno(playerid))
		{
		    if(PlayerToPoint(5, playerid, 356.2033,166.4368,1008.3765))
		    {
		        new gob[] = "Seguridad\nChofйr\nBotiquin\nRopa Normal";
		        SafeDialogEx(playerid,EQUIPO_GOB,DIALOG_STYLE_LIST,">> Gobierno <<",gob,"Equipar","Cancelar");
		    }
		}
        if(Hitman(playerid))
		{
	    	if(PlayerToPoint(5, playerid, 2455.6589,-1706.8740,1013))
			{
				if(GetPlayerVirtualWorld(playerid) == 5000)
				{
            		new hit[] = "Cuchillo + Pistola SD\nSniper\nDisfraz";
            		SafeDialogEx(playerid,DIALOG_HITMAN,DIALOG_STYLE_LIST,"Armeria y Disfraces",hit,"Equipar","Cancelar");
            	}
			}
		}
		else if(Team_LSMD(playerid))
		{
			if(PlayerToPoint(5, playerid, 1188.8640,-1351.4312,2423.2649))
			{
			    new eq[] = "Traje Doctor\nTraje Mйdico Blanco\nTraje Mйdico Azul\nTraje Mйdico Verde\nIndumentario Normal";
			    SafeDialogEx(playerid,EQUIPO_DOC,DIALOG_STYLE_LIST,">> Equipo LSMD <<",eq,"Equipar","Cancelar");
			}
		}
	    return 1;
	}
La faccion que digo no tiene Team ni nada.
Reply
#2

Es sencillo, Agregas otro if en el comando y seria asн:

pawn Код:
if(pInfo[targetid][pMember] == IDFACCION || JInfo[targetid][pLeader] == IDFACCION)
        {
            if(PlayerToPoint(DISTANCIA, playerid, POSX, POSY, POSZ))
            {
new gob[] = "Seguridad\nChofйr\nBotiquin\nRopa Normal";
SafeDialogEx(playerid,EQUIPO_GOB,DIALOG_STYLE_LIST,">> Tu Facciуn<<",gob,"Equipar","Cancelar");
}
}
Claro, cambiando lo de 'IDFACCIУN' Por la ID de ella y lo que te he marcado como POSX, POSY, POSZ, Distancia.
Reply
#3

Gracias por responder.
Me da estos errores
Код:
 : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
 : error 017: undefined symbol "targetid"
 : error 029: invalid expression, assumed zero
 : fatal error 107: too many error messages on one li
La linea
Код:
if(pInfo[targetid][pFMember] == 4 || JInfo[targetid][pLeader] == 4)
Reply
#4

Quote:
Originally Posted by TheThug
Посмотреть сообщение
Gracias por responder.
Me da estos errores
Код:
 : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
 : error 017: undefined symbol "targetid"
 : error 029: invalid expression, assumed zero
 : fatal error 107: too many error messages on one li
La linea
Код:
if(pInfo[targetid][pFMember] == 4 || JInfo[targetid][pLeader] == 4)
Claro, eso es porque debes adaptar este cуdigo depende de las variables de tu gamemode/filterscript/include.
Reply
#5

Listo ya lo hice ,gracias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)