CMD:mute(playerid, params[])
{
#if defined mute
new targetid;
new reason[128];
new str[256];
new AdminName[MAX_PLAYER_NAME];
new Target[MAX_PLAYER_NAME];
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You aren't authorized to use this command!");
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_GREY, "Usage:/mute (playerid/partofname) (reason)");
else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "[{B4B5B7}System{FF6347}]: {B4B5B7}Player not found!");
else
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(targetid, Target, sizeof(Target));
format(str, sizeof(str), "[{B4B5B7}Admin{FF6347}]{B4B5B7}'%s has muted {FF6347}[{B4B5B7}Player{FF6347}]{B4B5B7}'%s. {FF6347}Reason; {B4B5B7}%s .", AdminName, targetid, reason);
SendClientMessageToAll(COLOR_RED, str);
Info[targetid][isMuted] = 1;
#endif
}
return 1;
}
pawn Код:
|
CMD:mute(playerid, params[])
{
#if defined mute
new targetid;
new reason[128];
new str[256];
new AdminName[MAX_PLAYER_NAME];
new Target[MAX_PLAYER_NAME];
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You aren't authorized to use this command!");
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_GREY, "Usage:/mute (playerid/partofname) (reason)");
else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "[{B4B5B7}System{FF6347}]: {B4B5B7}Player not found!");
else
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(targetid, Target, sizeof(Target));
format(str, sizeof(str), "[{B4B5B7}Admin{FF6347}]{B4B5B7}'%s has muted {FF6347}[{B4B5B7}Player{FF6347}]{B4B5B7}'%s. {FF6347}Reason; {B4B5B7}%s .", AdminName, targetid, reason);
SendClientMessageToAll(COLOR_RED, str);
Info[targetid][isMuted] = 1;
}
#endif
return 1;
}
CMD:mute(playerid, params[])
{
#if defined mute
new targetid;
new reason[128];
new str[256];
new AdminName[MAX_PLAYER_NAME];
new Target[MAX_PLAYER_NAME];
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You aren't authorized to use this command!");
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_GREY, "Usage:/mute (playerid/partofname) (reason)");
else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "[{B4B5B7}System{FF6347}]: {B4B5B7}Player not found!");
else
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(targetid, Target, sizeof(Target));
format(str, sizeof(str), "[{B4B5B7}Admin{FF6347}]{B4B5B7}'%s has muted {FF6347}[{B4B5B7}Player{FF6347}]{B4B5B7}'%s. {FF6347}Reason; {B4B5B7}%s .", AdminName, targetid, reason);
SendClientMessageToAll(COLOR_RED, str);
Info[targetid][isMuted] = 1;
#endif
return 1;
}
pawn Код:
|
CMD:mute(playerid, params[])
{
#if defined mute
new targetid;
new reason[128];
new str[256];
new AdminName[MAX_PLAYER_NAME];
new Target[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You aren't authorized to use this command!");
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_GREY, "Usage:/mute (playerid/partofname) (reason)");
if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GRAY, "User not connected");
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(targetid, Target, sizeof(Target));
format(str, sizeof(str), "[{B4B5B7}Admin{FF6347}]{B4B5B7}'%s has muted {FF6347}[{B4B5B7}Player{FF6347}]{B4B5B7}'%s. {FF6347}Reason; {B4B5B7}%s .", AdminName, targetid, reason);
SendClientMessageToAll(COLOR_RED, str);
Info[targetid][isMuted] = 1;
#endif
return 1;
}