[Ajuda] ERRO com strings
#1

Olб :/

Eu tava sem fazer nada e decidi criar um cod que mostrasse o nome do jogador quando ele fosse citado no chat.
tipo @Nome. Eu fiz como um cmd... e funcionou. mas na hora de colocar no OnPlayerText nгo aparece nada no chat

Код:
	new OutraMsg[100],MsgFormatar[101];

	new CorTexto1 = Vermelho;
	new PosicaoInicial = strfind(Texto,"@",true);
	new PosicaoFinal = strfind(Texto," ",true);
	if(strfind(Texto,"@", true) != -1){
	if(PosicaoFinal == -1){
	PosicaoFinal = strlen(Texto);}
	foreach(new Todos: Player){
	if(IsPlayerConnected(Todos)){
	strmid(OutraMsg,Texto,PosicaoInicial+1,PosicaoFinal,sizeof(OutraMsg));
	if(strfind(Nome(Todos),OutraMsg, true,PosicaoInicial-1) != -1){
	PlayerPlaySound(Todos,1085,0.0,0.0,0.0);
	strdel(Texto,PosicaoInicial,PosicaoFinal);
	format(MsgFormatar,sizeof(MsgFormatar),"{%06x}@%s{%06x}",GetPlayerColor(playerid)>>>8,OutraMsg,CorTexto1>>>8);
	strins(Texto,MsgFormatar,PosicaoInicial,sizeof(Texto));}}}}
	format(MsgFormatar,sizeof(MsgFormatar),"{%06x}%s(%d):{%06x} %s",GetPlayerColor(playerid)>>>8,Nome(playerid),playerid,CorTexto1>>>8,Texto);
	SendClientMessageToAll(Branco,MsgFormatar);
Obrigado!
Reply
#2

Use isso como base: https://sampforum.blast.hk/showthread.php?tid=532337
Reply
#3

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Eu jб tinha observado esse tуpico, mas, nгo tem link de download e nгo explica como fazer o sistema :\
Reply
#4

Quote:
Originally Posted by Guscooby
Посмотреть сообщение
Eu jб tinha observado esse tуpico, mas, nгo tem link de download e nгo explica como fazer o sistema :\
O download й salvar em inc o cуdigo
Reply
#5

Quote:
Originally Posted by Felipealves
Посмотреть сообщение
O download й salvar em inc o cуdigo
Qual Cуdigo .-.?
nгo tem nenhum no tуpico :/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)