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;
}
I already ask you if you need help with PM Reply you said no now you need help...
You need to store the playerid to a variable or a PVarInt |
//Top of script
new LastReply[MAX_PLAYERS];
//PM command
CMD:PM(playerid, params[])
{
new id, message[120];
if(sscanf(params, "is[120]", id, message)) return SendClientMessage(playerid, -1, "Usage: /pm ID message");
SendClientMessage(id, -1, message);
SendClientMessage(playerid, -1, "message sent");
LastReply[id] = playerid;
return 1;
}
CMD:r(playerid, params[])
{
SendClientMessage(LastReply[playerid], -1, params);
SendClientMessage(playerid, -1, "message sent");
return 1;
}