command /me (easy help) -
Zeus666 - 02.07.2016
I want a /me like
Username goes to bar and grabs something to eat while he sp..
..eaks to the barman ((Username))
Код:
SendCustomPlayerMessage(playerid, color, text[])
{
if(strlen(text) > 112)
{
new text1[112],
text2[112],
pos = strfind(text," "false,102)
string[224];
strmid(text1, text, 0, pos);
strmid(text2, text, pos, strlen(text));
format(string, sizeof(string), "%s...", text1);
SendClientMessage(playerid, color, string);
format(string, sizeof(string), "...%s", text2);
SendClientMessage(playerid, color, string);
}
else SendClientMessage(playerid, color, text);
}
CMD:me(playerid, params[])
{
new string[128], action[128];
if(sscanf(params, "s[128]", action))
{
SendClientMessage(playerid, -1, ""chat" /me [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s %s", PlayerName(playerid), action);
ProxDetector(30, playerid, string, COLOR_PURPLE);
}
return 1;
}
This is my code, but doesn't work.
Re: command /me (easy help) -
oktokt1 - 02.07.2016
You dont want all of tht lol.
Just
New String[128], action[128];
if(sscanf(params, "u", action)) return SendClientMessage(playerid, color, "USE: /me {Text}");
format(string, sizeof(string), "* %d %d", PlayerName(playerid), action);
SendClientMessageToAll(color, string);
return 1;
Under CMD:me(playerid, params[])
Re: command /me (easy help) -
Zeus666 - 02.07.2016
I want to make line to divide to 2 lines
like
Username goes to bar and grabs something to eat while he sp..
..eaks to the barman ((Username
Re: command /me (easy help) -
oktokt1 - 02.07.2016
How the cmd will be?
Give me example how will u type it in game.
My cmd will be like
* oktokt1 goes to bar and grabs something to eat while he sp...eaks to the barman.
Tha will show that "*Oktokt goes to bar and grabs something to eat while he sp..
..eaks to the barman"
Re: command /me (easy help) -
Dayrion - 02.07.2016
I think he means something like that.
Код:
* Dayrion HIIMDAYRION WHATS UP TODAY BLABLABLABLA NO WORRIS I GOT THIS
to
Код:
Dayrion HIIMDAYRION WHATS UP TODAY BLABLABLABLA
... NO WORRIS I GOT THIS
Because the /me is too long.
Re: command /me (easy help) -
Golimad - 02.07.2016
new text1[112],
text2[112],
string[224],
pos = strfind(text," ", false, 102);
Re: command /me (easy help) -
Zeus666 - 03.07.2016
Quote:
Originally Posted by oktokt1
How the cmd will be?
Give me example how will u type it in game.
My cmd will be like
* Zeus666 goes to bar and grabs something to eat while he sp...eaks to the barman.
Tha will show that "*Oktokt goes to bar and grabs something to eat while he sp..
..eaks to the barman"
|
Quote:
Originally Posted by Dayrion
I think he means something like that.
Код:
* Zeus666 HIIMDAYRION WHATS UP TODAY BLABLABLABLA NO WORRIS I GOT THIS
to
Код:
Dayrion HIIMDAYRION WHATS UP TODAY BLABLABLABLA
... NO WORRIS I GOT THIS
Because the /me is too long.
|
That's correct.
Zeus666 goes to Los Santos with his car while he listens to th...
... e music and enjoys himself
something like that.
and gives me error warning 203: symbol is never used: "SendCustomPlayerMessage"
I want this for all chats. Normal chat, /b chat, /pm chat, everything.
I need to switch formatstring to sendcustomplayermessage maybe but i don't know how
Re: command /me (easy help) -
Fairuz - 03.07.2016
Quote:
Originally Posted by Zeus666
That's correct.
and gives me error warning 203: symbol is never used: "SendCustomPlayerMessage"
|
It's a warning,just remove it (if you never use it) SendCustomPlayerMessage from your script and then recompile it again
Re: command /me (easy help) -
JohnBlaze1971 - 03.07.2016
Код:
CMD:me(playerid,params[])
{
new msg[64],str[128];
if(sscanf(params,"s",msg)) return SendClientMessage(playerid,color,"[ ! ] Usage: /me <message>");
format(str,sizeof(str),"[ ! ]Player ID [%d] : %s",playerid,msg);
SendClientMessageToAll(color,str);
return 1;
}
Try using it, and i am sure it will work, But as i have read you previous comments you need something that divide the msg into 2 lines, So that's possible when you divide the string. try it
Re: command /me (easy help) -
Zeus666 - 03.07.2016
I've changed the splitmessage into
Код:
stock SendSplitMessage(playerid, color, final[])
{
new buffer[EX_SPLITLENGTH+5];
new len = strlen(final);
if(len>EX_SPLITLENGTH)
{
new times = (len/EX_SPLITLENGTH);
for(new i = 0; i < times+1; i++)
{
strdel(buffer, 0, EX_SPLITLENGTH+5);
if(len-(i*EX_SPLITLENGTH)>EX_SPLITLENGTH)
{
strmid(buffer, final, EX_SPLITLENGTH*i, EX_SPLITLENGTH*(i+1));
format(buffer, sizeof(buffer), "%s ...", buffer);
}
else
{
strmid(buffer, final, EX_SPLITLENGTH*i, len);
}
SendClientMessage(playerid, color, buffer);
}
}
else
{
SendClientMessage(playerid, color, final);
}
}
this is my command me
Код:
CMD:me(playerid, params[])
{
new string[128], action[128];
if(sscanf(params, "s[128]", action))
{
SendClientMessage(playerid, -1, ""chat" /me [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s %s", PlayerName(playerid), action);
SendSplitMessage(playerid, COLOR_PURPLE, string);
ProxDetector(30, playerid, string, COLOR_PURPLE);
}
return 1;
}
error in chat:
http://i.imgur.com/l2K2kuq.png
I want
Zeus666 wants to be friend with everyone but he never goes fully retarded like ....
... them i don't know why
and / or
Zeus666 wants to be friend with everyone but he never goes fully retarded li ....
... ke them i don't know why