solucionar errores
#1

Me sale estos errores y no se solucionar.
pawn Код:
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\Hzerok.pwn(246) : error 017: undefined symbol "NearMsg"
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\Hzerok.pwn(256) : error 017: undefined symbol "NearMsg"
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\Hzerok.pwn(266) : error 017: undefined symbol "NearMsg"
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\Hzerok.pwn(277) : error 017: undefined symbol "NearMsg"
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\Hzerok.pwn(292) : error 017: undefined symbol "NearMsg"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Aqui los comandos
pawn Код:
/*--Comandos de Rol--*/
CMD:me(playerid, params[])
{
    new string[124], nameplayer[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nameplayer, MAX_PLAYER_NAME);
    if(isnull(params)) return SendClientMessage(playerid, Gris,"USA: /me [TEXTO]");
    format(string, sizeof(string), "* %s %s", nameplayer, params);
    NearMsg(playerid, 0xC2A2DAFF, string, 15.0);
    return 1;
}

CMD:b(playerid,params[])
{
    new string[124], nameplayer[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nameplayer, MAX_PLAYER_NAME);
    if(isnull(params)) return SendClientMessage(playerid, Gris,"USA: /b [TEXTO OOC]");
    format(string, sizeof(string), "(( %s dice: %s ))", nameplayer, params);
    NearMsg(playerid, 0xE6E6E6E6, string, 15.0);
    return 1;
}

CMD:do(playerid, params[])
{
    new string[124], nameplayer[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nameplayer, MAX_PLAYER_NAME);
    if(isnull(params)) return SendClientMessage(playerid, Gris,"USA: /do [TEXTO]");
    format(string, sizeof(string), "* %s (( %s ))", params, nameplayer);
    NearMsg(playerid, 0x9EC73DAA, string, 15.0);
    return 1;
}

zcmd(s, playerid, params[])
{
    new string[124], nameplayer[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nameplayer, MAX_PLAYER_NAME);
    if(!isnull(params))
    {
        format(string, sizeof(string), "%s susurra: %s", nameplayer, params);
        NearMsg(playerid, COLOR_WHITE, string, 5.0);
        format(string, sizeof(string), "susurro: %s", params);
        return SetPlayerChatBubble(playerid,string,-1,5.0,5000);
    }
    else SendClientMessage(playerid, Gris, "* /s <Texto>");
    return 1;
}

zcmd(g, playerid, params[])
{
    new string[124], nameplayer[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nameplayer, MAX_PLAYER_NAME);
    if(!isnull(params))
    {
        format(string, sizeof(string), "%s grita: Ў%s!", nameplayer, params);
        NearMsg(playerid, COLOR_WHITE, string, 40.0);
        format(string, sizeof(string), "grito: Ў%s!", params);
        return SetPlayerChatBubble(playerid,string,-1,60.0,5000);
    }
    else SendClientMessage(playerid, Gris, "* /g <Texto>");
    return 1;
}
Reply
#2

Creo que te hace falta una funciуn quй manda un mensaje a ciertos jugadores a una cierta distancia, puedes intentar con esto o de donde tomaste esos comandos buscalo.

pawn Код:
stock NearMsg(playerid, color, string[], Float:distancia)
{
    new Float:cord[3];
    GetPlayerPos(playerid, cord[0], cord[1], cord[2]);
   
    for(new x = 0; x < MAX_PLAYERS; x++)
    {
        if(IsPlayerInRangeOfPoint(x, distancia, cord[0], cord[1], cord[2]))
        {
            SendClientMessage(x, color, string);
        }
    }
    return true;
}
Reply
#3

Aca tenes otro mйtodo, estб basado en el "ProxDetector" de ZenonCity:
Код:
forward NearMsg(playerid, color, string[], Float:distancia);
public NearMsg(playerid, color, string[], Float:distancia)
{
	if(IsPlayerConnected(playerid))
	{
		new BigEar[MAX_PLAYERS];
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
		if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
		{
		if(!BigEar[i])
		{
		GetPlayerPos(i, posx, posy, posz);
		tempposx = (oldposx -posx);
		tempposy = (oldposy -posy);
		tempposz = (oldposz -posz);
		if (((tempposx < distancia/16) && (tempposx > -distancia/16)) && ((tempposy < distancia/16) && (tempposy > -distancia/16)) && ((tempposz < distancia/16) && (tempposz > -distancia/16)))
		{
		SendClientMessage(i, color, string);
		}
		else if (((tempposx < distancia/8) && (tempposx > -distancia/8)) && ((tempposy < distancia/8) && (tempposy > -distancia/8)) && ((tempposz < distancia/8) && (tempposz > -distancia/8)))
		{
		SendClientMessage(i, color, string);
		}
		else if (((tempposx < distancia/4) && (tempposx > -distancia/4)) && ((tempposy < distancia/4) && (tempposy > -distancia/4)) && ((tempposz < distancia/4) && (tempposz > -distancia/4)))
		{
		SendClientMessage(i, color, string);
		}
		else if (((tempposx < distancia/2) && (tempposx > -distancia/2)) && ((tempposy < distancia/2) && (tempposy > -distancia/2)) && ((tempposz < distancia/2) && (tempposz > -distancia/2)))
		{
		SendClientMessage(i, color, string);
		}
		else if (((tempposx < distancia) && (tempposx > -distancia)) && ((tempposy < distancia) && (tempposy > -distancia)) && ((tempposz < distancia) && (tempposz > -distancia)))
		{
		SendClientMessage(i, color, string);
		}
		}
		else
		{
		SendClientMessage(i, color, string);
		}
	   }
	  }
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)