/me command issue - 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: /me command issue (
/showthread.php?tid=160111)
/me command issue -
TKZ227 - 15.07.2010
So I made a /me command from scratch:
pawn Код:
CMD:me(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new message;
if(sscanf(params, "s", message)) return SendClientMessage(playerid, CYAN, "[USAGE]: /me [text]. This command will display a local message, used for showing actions.");
{
new string[128];
format(string, sizeof(string), "*[ACTION]* %s: %s", ReturnPlayerName(playerid), message);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
}
}
return 1;
}
When I type /me with only two letters after (like /me hi) it works, but if I type more than 2 letters it doesn't work. It just says "Unknown Command".
Re: /me command issue -
ikey07 - 15.07.2010
new message[256];
Re: /me command issue -
bigcomfycouch - 15.07.2010
pawn Код:
CMD:me(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new message[128];
if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, CYAN, "[USAGE]: /me [text]. This command will display a local message, used for showing actions.");
else
{
new string[128];
format(string, sizeof(string), "*[ACTION]* %s: %s", ReturnPlayerName(playerid), message);
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
}
}
return 1;
}