dcmd_me problem - 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: dcmd_me problem (
/showthread.php?tid=307218)
dcmd_me problem -
Face9000 - 29.12.2011
pawn Код:
dcmd_me(playerid,params[])
{
if(sscanf(params,"dd",playerid,cmdtext)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "**%s %s", str, cmdtext[4]);
SendClientMessageToAll(COLOR_YELLOW, str);
format(str,sizeof str,"3,0: %s",str);
IRC_GroupSay(IRC_Group, EchoChan,str);
return 1;
}
error 017: undefined symbol "cmdtext"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
Re: dcmd_me problem -
[MG]Dimi - 29.12.2011
pawn Код:
dcmd_me(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
new str[128],name[24];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "**%s %s", name, params);
SendClientMessageToAll(COLOR_YELLOW, str);
format(str,sizeof str,"3,0: %s",str);
IRC_GroupSay(IRC_Group, EchoChan,str);
return 1;
}
UNTESTED
Re: dcmd_me problem -
Johnson_boy - 29.12.2011
change cmdtext[4] to params
Btw, I recommend you to use zcmd/ycmd, they are significantly faster.
Edit: I was a little late :P