Jump to content
  • 0

Bug /mute ?


Deejaybwg

Question

Salut!

Cand dau /mute id reason, apare ca i-am dat mute cuiva, dar de fapt el poate sa vorbeasca. Deci practic poate vorbi dupa ce i-am dat /mute.

De la ce poate fi ?

Asta este comanda:

[pawn]dcmd_mute(playerid,params[])

{

if(AccInfo[playerid][LoggedIn] == 1)

{

if(AccInfo[playerid][Level] >= 2)

{

    new tmp[256];

new tmp2[256];

new Index;

tmp = strtok(params,Index);

tmp2 = strtok(params,Index);

    if(!strlen(params)) return

SendClientMessage(playerid, LIGHTBLUE2, "Usage: /mute [PlayerID] [Reason]") &&

SendClientMessage(playerid, orange, "Function: Will mute the specified player");

new playername[MAX_PLAYER_NAME];

new adminname [MAX_PLAYER_NAME];

    new player1, string[128];

player1 = strval(tmp);

if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (AccInfo[player1][Level] != ServerInfo[MaxAdminLevel]) )

{

    if(AccInfo[player1][Muted] == 0)

    {

GetPlayerName(player1, playername, sizeof(playername));

GetPlayerName(playerid, adminname, sizeof(adminname));

SendCommandToAdmins(playerid,"Mute");

PlayerPlaySound(player1,1057,0.0,0.0,0.0);

AccInfo[player1][Muted] = 1;

AccInfo[player1][MuteWarnings] = 0;

if(strlen(tmp2))

{

format(string,sizeof(string),"|- You have been Muted by Administrator %s | Reason: %s -|",adminname,params[2]);

SendClientMessage(player1,blue,string);

format(string,sizeof(string),"|-  You have Muted %s | Reason: %s -|", playername,params[2]);

return SendClientMessage(playerid,BlueMsg,string);

}

else

{

format(string,sizeof(string),"|- You have been muted by Administrator %s | No Specified Reason! -|",adminname);

SendClientMessage(player1,blue,string);

format(string,sizeof(string),"|- You have Muted %s -|", playername);

return SendClientMessage(playerid,BlueMsg,string);

}

}

else return SendClientMessage(playerid, red, "ERROR: Player is already muted");

}

else return SendClientMessage(playerid, red, "ERROR: Player is not connected or is the highest level admin");

}

else return ErrorMessages(playerid, 1);

}

else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");

}[/pawn]

Dar nu cred ca este de la comanda.. :undecided: Pentru ca este aceeasi comanda din LuxAdmin original.

www.youtube.com/thebwgg

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Asta am:

[pawn]if(AccInfo[playerid][Muted] == 1)

{

AccInfo[playerid][MuteWarnings]++;

new string[128];

if(AccInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings])

{

format(string, sizeof(string),"|- ATTENTION: You are Muted. Cannot talk. (Warnings: %d/%d) -|",AccInfo[playerid][MuteWarnings],ServerInfo[MaxMuteWarnings]);

SendClientMessage(playerid,red,string);

}

else

{

SendClientMessage(playerid,red,"|- You have been Automatically Kicked. | Reason: Exceeding Mute Warnings -|");

format(string, sizeof(string),"|- Player %s (Id:%d) has been Automatically Kicked. | Reason: Exceeding Mute Warnings -|",PlayerName2(playerid),playerid);

SendClientMessageToAll(grey,string);

SaveIn("KickLog",string); Kick(playerid);

} return 0;

}[/pawn]

www.youtube.com/thebwgg

Link to comment
Share on other sites

Sterge tot ce ai tu scris acolo la mute si scrie asta:

[pawn]    if (strcmp(cmd, "/muted", true) == 0)

{

    if(IsPlayerConnected(playerid))

  {

if(PlayerInfo[playerid][pAdmin] >= 1)

{

        new count = 0;

SendClientMessage(playerid, COLOR_LIGHTGREEN, "|___Muted Players___|");

    for(new i=0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

    if(PlayerInfo[pMuted] == 1)

    {

      GetPlayerName(i, giveplayer, sizeof(giveplayer));

        format(string, sizeof(string), "[%d]%s - Mute time left: [%d]", i,giveplayer,PlayerInfo[pMuteTime]);

SendClientMessage(playerid,COLOR_WHITE,string);

count++;

}

}

}

if(count == 0)

{

    SendClientMessage(playerid,COLOR_LIGHTRED,"* Currently no muted players online.");

}

}

    else

    {

          SendClientMessage(playerid, COLOR_WHITE, " You are not authorized to use that command !");

    }

}

return 1;

}

[/pawn]

Link to comment
Share on other sites

Eu stiu ca ar trebui sa ai la comanda de chat , de exemplu la comanda /lc , (Leaders-Chat) in cazul daca GM-ul este GodFather , RP etc , o functie [pMuted1]

Serverul meu este Stunt-DM-Race-Drift-FreeRoam, dar nu RP.

Sterge tot ce ai tu scris acolo la mute si scrie asta:

[pawn]    if (strcmp(cmd, "/muted", true) == 0)

{

    if(IsPlayerConnected(playerid))

  {

if(PlayerInfo[playerid][pAdmin] >= 1)

{

        new count = 0;

SendClientMessage(playerid, COLOR_LIGHTGREEN, "|___Muted Players___|");

    for(new i=0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

    if(PlayerInfo[pMuted] == 1)

    {

      GetPlayerName(i, giveplayer, sizeof(giveplayer));

        format(string, sizeof(string), "[%d]%s - Mute time left: [%d]", i,giveplayer,PlayerInfo[pMuteTime]);

SendClientMessage(playerid,COLOR_WHITE,string);

count++;

}

}

}

if(count == 0)

{

    SendClientMessage(playerid,COLOR_LIGHTRED,"* Currently no muted players online.");

}

}

    else

    {

          SendClientMessage(playerid, COLOR_WHITE, " You are not authorized to use that command !");

    }

}

return 1;

}

[/pawn]

Am LuxAdmin ! Comenzile incep cu dcmd_comanda.

www.youtube.com/thebwgg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.