30.07.2013, 18:05
O Titulo Ja Diz
Aparece q cala mais o player continua falando !
Comando /Calar
Comando /Descalar
Aparece q cala mais o player continua falando !
Comando /Calar
pawn Код:
COMMAND:calar(playerid, params[])
{
new Msg[128], Name[24], AdminName[24], Reason[128], OtherPlayer;
SendAdminText(playerid, "/calar", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "us[128]", OtherPlayer, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Use: /calar [id] [motivo]");
else
{
if (IsPlayerConnected(OtherPlayer))
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(OtherPlayer, Name, sizeof(Name));
APlayerData[OtherPlayer][Muted] = true;
format(Msg, 128, "{FF0000}-| %s foi calado por %s. Motivo: %s |-", Name, AdminName, Reason);
SendClientMessageToAll(0xFFFFFFFF, Msg);
PlayerFile_Save(OtherPlayer);
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}O jogador nгo estб online.");
}
}
else
return 0;
}
else
return 0;
return 1;
}
Comando /Descalar
pawn Код:
COMMAND:descalar(playerid, params[])
{
new Msg[128], Name[24], AdminName[24], OtherPlayer;
SendAdminText(playerid, "/descalar", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /descalar [id]");
else
{
if (IsPlayerConnected(OtherPlayer))
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(OtherPlayer, Name, sizeof(Name));
APlayerData[OtherPlayer][Muted] = false;
format(Msg, 128, "{FF0000}-| O Administrador %s permitiu que %s volte a falar |-", AdminName, Name);
SendClientMessageToAll(0xFFFFFFFF, Msg);
PlayerFile_Save(OtherPlayer);
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}O jogador nao esta online.");
}
}
else
return 0;
}
else
return 0;
return 1;
}