26.03.2012, 15:39
Sorry my English is bad.
Can someone help me if i want make a code if i am admin and i want read all of player PM
I just make a simple PM script like thi
But i am confuse to make a admin read PM code.
Can someone help me if i want make a code if i am admin and i want read all of player PM
I just make a simple PM script like thi
Код:
CMD:pm(playerid, params[])
{
new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, str2))
{
SendClientMessage(playerid, COLOR_GREY, "Usage: /pm [id] [message]");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "ERROR: Player not connected");
{
GetPlayerName(playerid, Name1, sizeof(Name1));
GetPlayerName(id, Name2, sizeof(Name2));
format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
SendClientMessage(playerid, COLOR_YELLOW, str);
format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
SendClientMessage(id, COLOR_YELLOW, str);
}
return 1;
}


