30.07.2012, 19:39
Can someone show me how to make a fast /reply command which will reply to latest message without typing the ID ?
pawn Код:
if(strcmp(cmd, "/pm",true) == 0)
{
new tmp[256];
tmp=strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientUsage(playerid,cmd,"[PartOfName/ID] [message]");
TargetUser(tmp,playerid)
if(PlayerTemp[giveplayerid][pmlock]) return SendClientError(playerid,"This player has locked his incomming PM");
tmp=strrest(cmdtext,idx);
if(!strlen(tmp)) return SendClientUsage(playerid,cmd,"[PartOfName/ID] [message]");
if(FindIP(tmp))
{
KickReas("[SERVER]",playerid,"Atempting to advertise IP's!");
return 1;
}
new stringa[MAX_STRING];
format(stringa,sizeof(stringa),"[PM Sent to %s[%i]: %s]",PlayerName(giveplayerid),giveplayerid,tmp);
SendClientMessage(playerid,COLOR_PLAYER_LIGHTBLUE,stringa);
format(stringa,sizeof(stringa),"[PM From %s[%i]: %s]",PlayerName(playerid),playerid,tmp);
new floriansxazuttfzbuikz[600];
format(floriansxazuttfzbuikz, sizeof(floriansxazuttfzbuikz), "7,6[ PM ] %s[%d] to %s[%d]: %s",NameEx(playerid),playerid,NameEx(giveplayerid),giveplayerid,tmp);
IRC_GroupSay(gGroupID, IRC_CHANNEL,floriansxazuttfzbuikz);
SendClientMessage(giveplayerid,COLOR_PLAYER_LIGHTBLUE,stringa);
return 1;
}