/me doesnt work - 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 doesnt work (
/showthread.php?tid=365667)
/me doesnt work -
Beastlynoob - 03.08.2012
Ok so my friends have given me different versions of /me and none work,heres the cmd:
Код:
if (strcmp("/me", cmdtext, true) == 0)
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}
But it only works when i type just /me,it gives me message USAGE: /me [action] but if i put a space between such as
* Beastlynoob eats bacon i will get unknown command error,can someone help me?
please?
Re: /me doesnt work -
[KHK]Khalid - 03.08.2012
You forgot to put the length of the command
pawn Код:
if (strcmp("/me", cmdtext, true, 3) == 0) // while 3 is the length of "/me"