[HELP NEEDED] I want to know how to make commands like /me - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP NEEDED] I want to know how to make commands like /me (
/showthread.php?tid=100322)
[HELP NEEDED] I want to know how to make commands like /me -
dirkblok - 04.10.2009
Hello,
I'm trying to know the codes a little bit but I don't know how to make commands like:
[me=dirkblok]grabs a cigar[/me]
that it looks like
*Player grabs a cigar*
Can someone help me with this?
Thanks alot
Re: [HELP NEEDED] I want to know how to make commands like /me -
dirkblok - 04.10.2009
Oops I didn't saw that / me actually works on this forum, but I hope you guys know what I mean, like in roleplay servers.
Thanks alot
Re: [HELP NEEDED] I want to know how to make commands like /me -
Rickyboy30 - 04.10.2009
Same here!
Also. I would like to have /do ...
it's the opposite of / me.
it's like:
/ me attempds to break the carwindow
/do Succeeded - It's broken
Re: [HELP NEEDED] I want to know how to make commands like /me -
Puzi - 04.10.2009
Enter that under OnPlayerCommandText public:
Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3]) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new string[128], name[16];
GetPlayerName(playerid, name, sizeof(name));
format(string, 128, "*** %s %s", name, cmdtext[4]);
SendClientMessageToAll(COLOR_LIGHTGREEN, string);
return 1;
And define this at top of the gamemode:
Код:
#define COLOR_LIGHTGREEN 0x00F400FF
Hope I helped and it works

Regards
Puzi
Re: [HELP NEEDED] I want to know how to make commands like /me -
dirkblok - 04.10.2009
Thanks alot man!
Re: [HELP NEEDED] I want to know how to make commands like /me -
Correlli - 04.10.2009
Next time at least try to search on wiki before you post:
https://sampwiki.blast.hk/wiki/Using_strcmp()
Re: [HELP NEEDED] I want to know how to make commands like /me -
dirkblok - 04.10.2009
Sorry, I tried but couldn't find on the forums