/me cmd - 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)
+--- Thread: /me cmd (
/showthread.php?tid=338623)
/me cmd -
logoster - 30.04.2012
ok so i compiled without any eroors or wanring's but when i went in-game to test it it said it was an invalid command
heres my code
Код:
if (strcmp("/me", cmdtext, true, 10) == 0)
{
new me[20];
new text[19];
new name[MAX_PLAYER_NAME];
format(me, sizeof(me), "*%s %s", name, text);
SendClientMessageToAll(COLOR_WHITE, me);
IRC_GroupSay(gGroupID, IRC_CHANNEL, me);
IRC_GroupSay(gGroupID, ADMIN_IRC_CHANNEL, me);
return 1;
}
Re: /me cmd -
LaGrande - 30.04.2012
Код:
if (strcmp("/me", cmdtext, true, 3) == 0)
{
new me[20];
new text[19];
new name[MAX_PLAYER_NAME];
format(me, sizeof(me), "*%s %s", name, text);
SendClientMessageToAll(COLOR_WHITE, me);
IRC_GroupSay(gGroupID, IRC_CHANNEL, me);
IRC_GroupSay(gGroupID, ADMIN_IRC_CHANNEL, me);
return 1;
}
This may help you!
Re: /me cmd -
MichaelProPlayer - 30.04.2012
Take this :
Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, COLOR_INFOTEXT, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(COLOR_BEIGE, str);
return 1;
}