Jump to content
  • 0

Bug /mute ?


Question

Posted

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

8 answers to this question

Recommended Posts

Posted

La OnPlayerText trebuie sa ai ceva gen:

if(AccInfo[playerid][Muted]==1)
{
   //Nu poti vorbi, si alte chestii, warn ...
   return 0;
}

Daca nu-l ai, ia-l din LuxAdmin original.

Inainte sa postezi, gandeste putin ( mai mult, in cazul tau ).

Posted

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

Posted

Daca te apuci tu sa "editezi" luxadmin pastreaza originalul si nu`ti mai baga nasul ;)

Tu modifici in luxadmin si dupa spui ca e bug...

LuxAdmin original nu are "bug"-ul asta

76561198055981270.png

http://devilgaming.ro/forum

Posted

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]

userbar6.jpg
Posted

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]

Posted

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

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.