SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 15/01/2020, 12:02 AM   #1
Henriquearauj
Little Clucker
 
Henriquearauj's Avatar
 
Join Date: May 2019
Location: Brasil
Posts: 32
Reputation: 4
Default Quebra de linha

Já procurei em outras abas, fiz adaptando para minha GM e não deu muito certo, não quebra a linha ainda.

Code:
CMD:me(playerid, params[])
{
	new acao[500], texto[500];
	if(sscanf(params,"s", acao)) return msg(playerid, C_Laranja, "Use: /me(eu) [acao].");
	if(strlen(acao) > 36){
		new primeiralinha[64];
		format(primeiralinha, sizeof(primeiralinha), "** %s %s...", PegarNome(playerid), acao[36]);
		strdel(acao, 36, 100);
		ChatProximo(30.0, playerid, 0xC2A2DAAA, primeiralinha);
		ChatProximo(30.0, playerid, 0xC2A2DAAA, acao);
	}
	else{
		format(texto, sizeof(texto), "** %s %s", PegarNome(playerid), acao);
		ChatProximo(30.0, playerid, 0xC2A2DAAA, texto);
	}
	return 1;
}
Henriquearauj is offline   Reply With Quote
Old 15/01/2020, 05:13 AM   #2
iPhonee
Little Clucker
 
iPhonee's Avatar
 
Join Date: Jul 2019
Location: Brasil
Posts: 39
Reputation: 5
Default Re: Quebra de linha

Isso estar em portugues? vou por pra ingles para poder ver o problema, dai se muda dps '-'
__________________
https://discord.gg/bP25YQm
iPhonee is offline   Reply With Quote
Old 15/01/2020, 05:21 AM   #3
iPhonee
Little Clucker
 
iPhonee's Avatar
 
Join Date: Jul 2019
Location: Brasil
Posts: 39
Reputation: 5
Default Re: Quebra de linha

eu achei um pra voce aki

Code:
public OnPlayerCommandText ( playerid, cmdtext [ ] ) 
{ 
    if ( ! strcmp ( cmdtext, "/ me" , true, 3 ) )  // 3 é o tamanho de / me 
    { 
        if ( ! cmdtext [ 3 ] ) return SendClientMessage ( playerid, 0xFF0000FF, "USAGE: / me [ação]" ) ; 
        new str [ 128 ] ; 
        GetPlayerName ( playerid, str, sizeof( str ) ) ; 
        formato ( str, sizeof ( str ) , "*% s% s" , str, cmdtext [ 4 ] ) ; 
        SendClientMessageToAll ( 0xFFFF00AA, str ) ; 
        retornar  1 ; 
    } 
    retornar  0 ; 
}
Creditos:
Quote:
Twisted_Insane
__________________
https://discord.gg/bP25YQm
iPhonee is offline   Reply With Quote
Old 15/01/2020, 05:38 AM   #4
Syxh0wN
Huge Clucker
 
Syxh0wN's Avatar
 
Join Date: Nov 2013
Location: San Andreas
Posts: 252
Reputation: 9
Default Re: Quebra de linha

pawn Code:
SendClientMessageEx(playerid, color, const text[])
{
    #define LENGHT (36)

    if(strlen(text) > LENGHT)
    {
        new firstString[LENGHT], secondString[LENGHT];

        strmid(firstString, text, 0, LENGHT);
        strmid(secondString, text, LENGHT - 1, LENGHT * 2);

        format(firstString, LENGHT, "%s", firstString);
        format(secondString, LENGHT, "..%s", secondString);

        SendClientMessage(playerid, color, firstString);
        SendClientMessage(playerid, color, secondString);
   }
    else SendClientMessage(playerid, color, text);
   
    #undef LENGHT

    return 1;
}
Syxh0wN is offline   Reply With Quote
Old 15/01/2020, 02:58 PM   #5
Henriquearauj
Little Clucker
 
Henriquearauj's Avatar
 
Join Date: May 2019
Location: Brasil
Posts: 32
Reputation: 4
Default Re: Quebra de linha

Quote:
Originally Posted by Syxh0wN View Post
pawn Code:
SendClientMessageEx(playerid, color, const text[])
{
    #define LENGHT (36)

    if(strlen(text) > LENGHT)
    {
        new firstString[LENGHT], secondString[LENGHT];

        strmid(firstString, text, 0, LENGHT);
        strmid(secondString, text, LENGHT - 1, LENGHT * 2);

        format(firstString, LENGHT, "%s", firstString);
        format(secondString, LENGHT, "..%s", secondString);

        SendClientMessage(playerid, color, firstString);
        SendClientMessage(playerid, color, secondString);
   }
    else SendClientMessage(playerid, color, text);
   
    #undef LENGHT

    return 1;
}
Muito obrigado, me ajudou muito.
Rep +
Henriquearauj is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Quebra de linha iDark107 Português/Portuguese 6 28/09/2019 11:14 PM
[Ajuda] Quebra de linha. SukMathcuck Português/Portuguese 4 09/12/2016 03:47 PM
[Ajuda] Quebra de linha affasdas Português/Portuguese 6 12/07/2016 11:38 AM
[Ajuda] Quebra de linha OverKiller Português/Portuguese 5 03/04/2016 11:29 AM
[Ajuda] Quebra de Linha! #Luca[S]. Português/Portuguese 14 04/01/2015 11:41 PM


All times are GMT. The time now is 07:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.