[Off] [Pedido] Final de lнnea y saltar a otra.
#1

Quisiera saber si pueden ayudarme a poner una lнnea debajo de X mensaje cuando dicho jugador llega al lenght mбximo de una lнnea que siga a la de abajo:

Por ejemplo:

/b їMe podrнas ayudar con un error? Es que cuando intentу encender el vehнculo me sale que
- estб averiado.


Imбgenes de UnPlayer, asн mбs o menos lo quiero.





Acб les dejу mi comando de /b y el cуdigo de OnPlayerText

Код:
CMD:b(playerid, params[])
{
	if(!isnull(params))
	{
		new string[400];
		format(string, sizeof(string), "%s: (( %s ))", NombreJugador(playerid), params);
		ProxDetector(15.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,CHAT,CHAT2);
	} else SendClientMessage(playerid, COLOR_WHITE, "Usa {0094CE}/b [Texto]");
	return 1;
}

	//Cуdigo del OnPlayerText
	new string[400];
	format(string, sizeof(string), "%s dice: %s",NombreJugador(playerid), text);
	ProxDetector(15.0, playerid, string,Hablar,Hablar2,Hablar3,Hablar4,Hablar5);
	SetPlayerChatBubble(playerid, text, 0xFFFFFFFF, 15.0, 5000);
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=568530
Reply
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
ЎSaludos! Pero me serнa mбs fбcil que me hagan un ejemplo, conozco algunas cosas... Pero es que este me tiene al dar dos vueltas.
Reply
#4

Quote:
Originally Posted by Th3Cr4k3r
Посмотреть сообщение
ЎSaludos! Pero me serнa mбs fбcil que me hagan un ejemplo, conozco algunas cosas... Pero es que este me tiene al dar dos vueltas.
Ya lo tienes ahi, hasta se brinca a otras lineas entre las palabras.

http://pastebin.com/8zhhP95t
Reply
#5

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Ya lo tienes ahi, hasta se brinca a otras lineas entre las palabras.

http://pastebin.com/8zhhP95t
Se que se brinca las lнneas, pero no es la misma funciуn... Que le pongas varios colores en un comando a que sea solo 1 color.

Ni tiene el ProxDetector, me gustarнa con esto.

Код:
CMD:b(playerid, params[])
{
	if(!isnull(params))
	{
		new string[400];
		format(string, sizeof(string), "%s: (( %s ))", NombreJugador(playerid), params);
		ProxDetector(15.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,CHAT,CHAT2);
	} else SendClientMessage(playerid, COLOR_WHITE, "Usa {0094CE}/b [Texto]");
	return 1;
}
Reply
#6

Quote:
Originally Posted by Th3Cr4k3r
Посмотреть сообщение
Se que se brinca las lнneas, pero no es la misma funciуn... Que le pongas varios colores en un comando a que sea solo 1 color.

Ni tiene el ProxDetector, me gustarнa con esto.

Код:
CMD:b(playerid, params[])
{
	if(!isnull(params))
	{
		new string[400];
		format(string, sizeof(string), "%s: (( %s ))", NombreJugador(playerid), params);
		ProxDetector(15.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,CHAT,CHAT2);
	} else SendClientMessage(playerid, COLOR_WHITE, "Usa {0094CE}/b [Texto]");
	return 1;
}
Esta ficil hacer eso. Modifica la funcion del proxdetector para que use las funciones del include rz_messages.
Reply
#7

No lo sй hacer amigo.
Reply
#8

Publica la funcion del proxdetector pues.

EDIT: Algo asi:
pawn Код:
#include <rz_messages>

forward ProxDetector(Float:radi, playerid, str[], col1, col2, col3, col4, col5);
public ProxDetector(Float:radi, playerid, str[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        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);
        //radi = 2.0; //Trigger Radius
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {

                GetPlayerPos(i, posx, posy, posz);
                tempposx = (oldposx -posx);
                tempposy = (oldposy -posy);
                tempposz = (oldposz -posz);
                //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                {
                    SendMessage(i, col1, str);
                }
                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                {
                    SendMessage(i, col2, str);
                }
                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                {
                    SendMessage(i, col3, str);
                }
                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                {
                    SendMessage(i, col4, str);
                }
                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                {
                    SendMessage(i, col5, str);
                }
            }
        }
    }//not connected
    return 1;
}
Reply
#9

Aquн estб amigo, gracias por ayudarme.

Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
	if(IsPlayerConnected(playerid))
	{
		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 < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
		{
		SendClientMessage(i, col1, string);
		}
		else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
		{
		SendClientMessage(i, col2, string);
		}
		else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
		{
		SendClientMessage(i, col3, string);
		}
		else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
		{
		SendClientMessage(i, col4, string);
		}
		else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
		SendClientMessage(i, col5, string);
		}
	}
	else
	{
	SendClientMessage(i, col1, string);
	}
   }
  }
}
return 1;
}
Reply
#10

Descarga el include que te dije.

pawn Код:
#include <rz_messages>

forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        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 < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
        {
        SendMessage(i, col1, string);
        }
        else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
        {
        SendMessage(i, col2, string);
        }
        else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
        {
        SendMessage(i, col3, string);
        }
        else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
        {
        SendMessage(i, col4, string);
        }
        else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
        SendMessage(i, col5, string);
        }
    }
    else
    {
    SendMessage(i, col1, string);
    }
   }
  }
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)