16.06.2012, 10:12
I tried to create command with which player could reply on last pm sent to him.I did, but when player replies, target player doesnt see any text
Players see only: "<<< PM from examplename (ID:exampleid): >>>"
pawn Код:
new cmd[512], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/reply", true) == 0)
{
new tmp[512];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /reply "#COL_RED"[message]");
player = replyid[playerid];
GetPlayerName(player, incriminato, sizeof(incriminato)); GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, sizeof(string), "{ff0000}<<< {00ff00}PM from {ffcc00}%s (ID:%i): {ffffff}%s >>>", adminname,playerid, strval(tmp)), SendClientMessage(player,COLOR_LIGHTGREEN,string);
format(string, sizeof(string), "<<< PM for %s (ID:%i): %s >>>",incriminato, player, strval(tmp)),SendClientMessage(playerid,COLOR_LIGHTGREEN,string);
return 1;
}