21.08.2009, 11:37
version 2 is out
oops sorry for double post
if you are using a rp script with /pm in it you can use this
oops sorry for double post
if you are using a rp script with /pm in it you can use this
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
if(Afk[playerid]==0)
{
if(printpublic == 1){printf("Public-Print: OnPlayerPrivmsg(%d, %d, %s)", playerid, recieverid, text);}
new string[128];
new recievername[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, 24);
GetPlayerName(recieverid, recievername, 24);
format(string, sizeof(string), "PM from %s to %s: %s", playername, recievername, text);
SendPrivmsgToAdmins(COLOR_YELLOW, string);
format(string, sizeof(string), "%s to %s: %s\n", playername, recievername, text);
new File:hFile;
hFile = fopen("/logs/pm.cfg", io_append);
fwrite(hFile, string);
fclose(hFile);
}
else
{
SendClientMessage(playerid,0xFF0000AA, "You can not use /pm when you are afk");
}
return 1;
}