Comando ¬¬
#1

Tengo un GRAN comando que edita todo del negocio, entonces esta parte es la que jode, siempre dice que indique parбmetros y no cambia el interior... solo esta parte no funciona.

Код:
	else if(!strcmp(params[0], "interior", true))
	{
		for(new n = 0; n < sizeof(NegocioInfo); n ++)
		{
            if(sscanf(params, "i", params[1])) return SendClientMessage(playerid, COLOR_PIEL, "* Debe indicar parбmetros para el comando(/editarneg interior), ejemplo: /editarneg interior 1-19.");
			if(IsPlayerInRangeOfPoint(playerid, 5.0, NegocioInfo[n][nPosX], NegocioInfo[n][nPosY], NegocioInfo[n][nPosZ]))
			{
        	    switch(params[1])
				{
				    case 1: NegocioInfo[n][nIntX] = 167.2561, NegocioInfo[n][nIntY] = 1751.1589, NegocioInfo[n][nIntZ] = 617.6660, NegocioInfo[n][nInterior] = 0, NegocioInfo[n][nTipo] = 8;
                    case 2: NegocioInfo[n][nIntX] = 460.4592, NegocioInfo[n][nIntY] = -88.7668, NegocioInfo[n][nIntZ] = 999.5547, NegocioInfo[n][nInterior] = 4, NegocioInfo[n][nTipo] = 2;
                    case 3: NegocioInfo[n][nIntX] = 6.0092, NegocioInfo[n][nIntY] = -31.6645, NegocioInfo[n][nIntZ] = 1003.55, NegocioInfo[n][nInterior] = 10, NegocioInfo[n][nTipo] = 3;
                    case 4: NegocioInfo[n][nIntX] = 296.919982, NegocioInfo[n][nIntY] = -108.071998, NegocioInfo[n][nIntZ] = 1001.515625, NegocioInfo[n][nInterior] = 4, NegocioInfo[n][nTipo] = 4;
                    case 5: NegocioInfo[n][nIntX] = 207.737991, NegocioInfo[n][nIntY] = -109.019996, NegocioInfo[n][nIntZ] = 1005.132812, NegocioInfo[n][nInterior] = 15, NegocioInfo[n][nTipo] = 6;
                    case 6: NegocioInfo[n][nIntX] = 204.332992, NegocioInfo[n][nIntY] = -166.694992, NegocioInfo[n][nIntZ] = 1000.523437, NegocioInfo[n][nInterior] = 14, NegocioInfo[n][nTipo] = 6;
                    case 7: NegocioInfo[n][nIntX] = 207.054992, NegocioInfo[n][nIntY] = -138.804992, NegocioInfo[n][nIntZ] = 1003.507812, NegocioInfo[n][nInterior] = 3, NegocioInfo[n][nTipo] = 6;
                    case 8: NegocioInfo[n][nIntX] = 203.777999, NegocioInfo[n][nIntY] = -48.492397, NegocioInfo[n][nIntZ] = 1001.804687, NegocioInfo[n][nInterior] = 1, NegocioInfo[n][nTipo] = 6;
                    case 9: NegocioInfo[n][nIntX] = 226.293991, NegocioInfo[n][nIntY] = -7.431529, NegocioInfo[n][nIntZ] = 1002.210937, NegocioInfo[n][nInterior] = 5, NegocioInfo[n][nTipo] = 6;
                    case 10: NegocioInfo[n][nIntX] = 161.391006, NegocioInfo[n][nIntY] = -93.159156, NegocioInfo[n][nIntZ] = 1001.804687, NegocioInfo[n][nInterior] = 18, NegocioInfo[n][nTipo] = 6;
                    case 11: NegocioInfo[n][nIntX] = 493.390991, NegocioInfo[n][nIntY] = -22.722799, NegocioInfo[n][nIntZ] = 1000.679687, NegocioInfo[n][nInterior] = 17, NegocioInfo[n][nTipo] = 7;
                    case 12: NegocioInfo[n][nIntX] = 501.980987, NegocioInfo[n][nIntY] = -69.150199, NegocioInfo[n][nIntZ] = 998.757812, NegocioInfo[n][nInterior] = 11, NegocioInfo[n][nTipo] = 7;
                    case 13: NegocioInfo[n][nIntX] = 363.6101, NegocioInfo[n][nIntY] = -74.5734, NegocioInfo[n][nIntZ] = 1001.5078, NegocioInfo[n][nInterior] = 10, NegocioInfo[n][nTipo] = 1;
					case 14: NegocioInfo[n][nIntX] = 364.8434, NegocioInfo[n][nIntY] = -11.1929, NegocioInfo[n][nIntZ] = 1001.8516, NegocioInfo[n][nInterior] = 9, NegocioInfo[n][nTipo] = 2;
					case 15: NegocioInfo[n][nIntX] = 372.3882, NegocioInfo[n][nIntY] = -133.2151, NegocioInfo[n][nIntZ] = 1001.4922, NegocioInfo[n][nInterior] = 5, NegocioInfo[n][nTipo] = 5;
					case 16: NegocioInfo[n][nIntX] = 377.1189, NegocioInfo[n][nIntY] = -193.0325, NegocioInfo[n][nIntZ] = 1000.6401, NegocioInfo[n][nInterior] = 17, NegocioInfo[n][nTipo] = 8;
					case 17: NegocioInfo[n][nIntX] = 1204.809936, NegocioInfo[n][nIntY] = -11.586799, NegocioInfo[n][nIntZ] = 1000.921875, NegocioInfo[n][nInterior] = 2, NegocioInfo[n][nTipo] = 7;
					case 18: NegocioInfo[n][nIntX] = -456.3050, NegocioInfo[n][nIntY] = -277.9839, NegocioInfo[n][nIntZ] = 4021.8850, NegocioInfo[n][nInterior] = 10, NegocioInfo[n][nTipo] = 7;
					case 19: NegocioInfo[n][nIntX] = 1273.0547, NegocioInfo[n][nIntY] = -1595.2631, NegocioInfo[n][nIntZ] = 4001.0298, NegocioInfo[n][nInterior] = 3, NegocioInfo[n][nTipo] = 7;
                 }

				 new
	                 string2[80];
				 format(string2, sizeof(string2), "Administraciуn: %s le cambiу el interior al negocio %d.", NombreJugador(playerid), NegocioInfo[n][nSQLID]);
				 SendStaffMessage(COLOR_STAFF, string), GuardarNegocio_(n);

                 return 1;
             }
			 SendClientMessage(playerid, COLOR_ROJO, "* No estбs cerca de ningъn negocio.");
		 }
         return 1;
	}
Reply
#2

Optimiza eso con un array mucho mas mejor..
Reply
#3

Quote:
Originally Posted by wharlos
Посмотреть сообщение
Optimiza eso con un array mucho mas mejor..
? quiero que funcione! :c
Reply
#4

Quote:
Originally Posted by Fagrinht
Посмотреть сообщение
? quiero que funcione! :c
Prueba reventar el mouse contra la pared, eso te va a quitar todo el estrйs y vas a poder razonar mejor.

Intenta tener a mano uno de repuesto por si las moscas...
Reply
#5

Quote:
Originally Posted by bm0z
Посмотреть сообщение
Prueba reventar el mouse contra la pared, eso te va a quitar todo el estrйs y vas a poder razonar mejor.

Intenta tener a mano uno de repuesto por si las moscas...

Me hiciste el dнa COСIO JAJAJAJAAJAJ
Reply
#6

Quote:
Originally Posted by wharlos
Посмотреть сообщение
Optimiza eso con un array mucho mas mejor..
-..-
Reply
#7

No entiendo, quiero una solución y se ponen hablar cualquier cosa, sin ofender claro, pero necesito ayuda ahí.
Reply
#8

Bueno y por que no me paras y haces el array?

Код:
#define     MAX_TIPOS       (20)

enum InterioresNegocio
{
	nTInterior,
	Float:nTIntX,
	Float:nTIntY,
	Float:nTIntZ
}
new const Float:TiposInteriores[MAX_TIPOS][InterioresNegocio] =
{
	{0, 167.2561, 1751.1589, 617.6660}
};
Reply
#9

Quote:
Originally Posted by bm0z
Посмотреть сообщение
Prueba reventar el mouse contra la pared, eso te va a quitar todo el estrйs y vas a poder razonar mejor.

Intenta tener a mano uno de repuesto por si las moscas...
Aquн el mouse mas econуmico cuesta 500 u$d, no creo que quiera hacer eso.

Quote:
Originally Posted by wharlos
Посмотреть сообщение
Bueno y por que no me paras y haces el array?

Код:
#define     MAX_TIPOS       (20)

enum InterioresNegocio
{
	nTInterior,
	Float:nTIntX,
	Float:nTIntY,
	Float:nTIntZ
}
new const Float:TiposInteriores[MAX_TIPOS][InterioresNegocio] =
{
	{0, 167.2561, 1751.1589, 617.6660}
};
Me ayudo el arreglo de wharlos, bueno vamos allб, tenнas varios errores lуgicos en el sistema, por ejemplo las variables nada que ver, y un aviso que no tenнa sentido.

pawn Код:
//
enum e_tInteriores
{
    e_tInombre[32],
    e_tInt,
    e_tItipo,
    Float:e_tIpos[3],
}
new const tiposInteriores[][e_tInteriores] =
{
    {"Algo 1", 0, 1, {167.2561, 1751.1589, 617.6660}},
    {"Algo 2", 0, 2, {167.2561, 1751.1589, 617.6660}},
    {"Algo 3", 0, 3, {167.2561, 1751.1589, 617.6660}},
    {"Algo 4", 0, 4, {167.2561, 1751.1589, 617.6660}}
};

//Comando
else if(strfind(params[0], "interior", true) != -1)
{
    new tmp[128];
    if(sscanf(params, "i", params[1]))
    {
        SendClientMessage(playerid, COLOR_PIEL, "Use: /editarneg interior [Tipo]");
        SendClientMessage(playerid, COLOR_PIEL, "Tipos:");
        for(new i=0; i<sizeof(tiposInteriores); i++)
        {
            format(tmp, sizeof(tmp), "%d.- %s", i, tiposInteriores[i][e_tInombre]);
            SendClientMessage(playerid, COLOR_PIEL, tmp);
        }
        return 1;
    }
    //
    if(!(0 <= params[1] <= sizeof(tiposInteriores) - 1))
    {
        SendClientMessage(playerid, COLOR_PIEL, "Tipos:");
        for(new i=0; i<sizeof(tiposInteriores); i++)
        {
            format(tmp, sizeof(tmp), "%d.- %s", i, tiposInteriores[i][e_tInombre]);
            SendClientMessage(playerid, COLOR_PIEL, tmp);
        }
        return 1;
    }
    //
    for(new n=0; n<sizeof(NegocioInfo); n++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, NegocioInfo[n][nPos], NegocioInfo[n][nPosY], NegocioInfo[n][nPosZ]))
        {
            NegocioInfo[n][nIntX] = tiposInteriores[params[1]][e_tIpos][0];
            NegocioInfo[n][nIntY] = tiposInteriores[params[1]][e_tIpos][1];
            NegocioInfo[n][nIntZ] = tiposInteriores[params[1]][e_tIpos][2];
            NegocioInfo[n][nInterior] = tiposInteriores[params[1]][e_tInt];
            NegocioInfo[n][nTipo] = tiposInteriores[params[1]][e_tItipo];
            //
            format(tmp, sizeof(tmp), "Administraciуn: %s le cambiу el interior al negocio %d.", NombreJugador(playerid), NegocioInfo[n][nSQLID]);
            SendStaffMessage(COLOR_STAFF, tmp);
            //
            GuardarNegocio_(n);
            return 1;
        }
    }
    SendClientMessage(playerid, COLOR_ROJO, "* No estбs cerca de ningъn negocio.");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)