09.01.2012, 17:54
wth?
pawn Код:
if(strcmp(cmd, "/pm", true) == 0)
{
tmp = strtok(cmdtext,idx), tmp2 = strtok(cmdtext,idx);
new player1, text;
player1 = strval(tmp);
text = strval(tmp2);
if(!strlen(tmp) && !strlen(tmp2))
{
SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /PM [playerid] [text]");
}
else
{
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
format(string,sizeof(string),">> (PM) To %s: %s", player1, text);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string,sizeof(string),"<< (PM) From %s: %s", adminname, text);
SendClientMessage(player1, COLOR_YELLOW, string);
printf("%s has PMed: %s(%s)",adminname, playername, text);
}
return 1;
}