16.11.2013, 22:09
(
Последний раз редактировалось iFiras; 11.09.2014 в 03:12.
)
Deleted.
CMD:pm(playerid,params[]) {
new id, gMessage[128],Message[128],iName[MAX_PLAYER_NAME], pmName[MAX_PLAYER_NAME];
if (sscanf(params, "is",id,gMessage)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /pm <ID> <Message>");
if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/pm : Bad player ID");
return 1;
}
if(playerid == id) {
SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"You cannot PM yourself");
return 1;
}
if(ServerInfo[ReadPMs] == 1 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
{
new string[128],recievername[MAX_PLAYER_NAME];
GetPlayerName(playerid, string, sizeof(string)); GetPlayerName(id, recievername, sizeof(recievername));
format(string, sizeof(string), "***PM: %s To %s: %s", string, recievername, gMessage);
for (new a = 0; a < MAX_PLAYERS; a++) if ((PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel]) && a != playerid)
SendClientMessage(a, grey, string);
}
if(PlayerInfo[playerid][Muted] == 1)
{
new string[128];
PlayerInfo[playerid][MuteWarnings]++;
if(PlayerInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings]) {
format(string, sizeof(string),"WARNING: You are muted, if you continue to speak you will be kicked (Warning: %d/%d)", PlayerInfo[playerid][MuteWarnings], ServerInfo[MaxMuteWarnings] );
SendClientMessage(playerid,red,string);
} else {
SendClientMessage(playerid,red,"You have been warned! Now you have been kicked");
GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string),"%s [ID %d] Kicked for exceeding mute warnings", string, playerid);
SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string); Kick(playerid);
}
return 0;
}