Jump to content

Question

Posted

Salut tuturor, as dori ca atunci cand cineva din staff d /cc sa se stearga chatul la playeri dar la helperi / admini sa nu se sfearga. Sa scrie acolo ca: X has cleared the chat dar sa nu se stearga. Va rog sa ma ajutati. Multumesc.

10 answers to this question

Recommended Posts

Posted

Desigur, poftim:

[pawn]//----------------------------------[aclearchat]-----------------------------------------------

    if(strcmp(cmd, "/cc", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

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

{

                ClearChatboxToAll(playerid,100);

                GetPlayerName(playerid, sendername, sizeof(sendername));

                format(string, sizeof(string), "AdmCmd: %s a sters chatul", sendername);

                SendClientMessageToAll(COLOR_LIGHTRED, string);

                //SendClientMessage(playerid,0x70AD52FF, "Chatul a fost sters cu succes!");

}

else

{

SendClientMessage(playerid, COLOR_GRAD2, "You're not a Admin so you cannot use this command!");

return 1;

}

}

}[/pawn]

Posted

Uite:

if(strcmp(cmd, "/cc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
            {
                    for ( new i = 0; i < MAX_PLAYERS; i ++ )
            {
                if( PlayerInfo[i][pAdmin] < 1 || PlayerInfo[i][pHelper] < 1 )
                {
                    for ( new c = 0; c < 30; c++ ) // In loc de 30 pui cate linii vrei sa stearga
                    {
                                SendClientMessage(i, -1, " ");
                    }
                }
            }
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "Galaxy Omega: %s a sters chatul", sendername);
                SendClientMessageToAll(COLOR_LIGHTRED, string);
                //SendClientMessage(playerid,0x70AD52FF, "Chatul a fost sters cu succes!");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You're not a Admin so you cannot use this command!");
                return 1;
            }
        }
    }

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Posted

Uite:

if(strcmp(cmd, "/cc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
            {
                    for ( new i = 0; i < MAX_PLAYERS; i ++ )
            {
                if( PlayerInfo[i][pAdmin] < 1 || PlayerInfo[i][pHelper] < 1 )
                {
                    for ( new c = 0; c < 100; c++ ) // In loc de 30 pui cate linii vrei sa stearga
                    {
                                SendClientMessage(i, -1, " ");
                    }
                }
            }
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "Galaxy Omega: %s a sters chatul", sendername);
                SendClientMessageToAll(COLOR_LIGHTRED, string);
                //SendClientMessage(playerid,0x70AD52FF, "Chatul a fost sters cu succes!");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You're not a Admin so you cannot use this command!");
                return 1;
            }
        }
    }

Eu vreau ca tot chatul sa il stearga, degeaba sa dai de rotita in sus ca e curatat  doar la admini si helperi sa NU sd stearga.

Posted

inlocuieste functia ta ClearChatboxToAll

cu asta

[pawn]stock ClearChatboxToAll(rand);

{

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

    {

 

    if(PlayerInfo[p][pAdmin] < 1 || PlayerInfo[p][pHelper] < 1)

    {

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

        {

          SendClientMessage(p, 0xFFFFFFFF, " ");

    }

    }

    }

    return 1;

}[/pawn]

iar comanda ta va deveni [pawn] if(strcmp(cmd, "/cc", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

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

{

                ClearChatboxToAll(100);

                GetPlayerName(playerid, sendername, sizeof(sendername));

                format(string, sizeof(string), "AdmCmd: %s a sters chatul", sendername);

                SendClientMessageToAll(COLOR_LIGHTRED, string);

     

}

else

{

SendClientMessage(playerid, COLOR_GRAD2, "You are not a Admin so you cannot use this command!");

return 1;

}

}

}[/pawn]

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

Uite:

if(strcmp(cmd, "/cc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
            {
                    for ( new i = 0; i < MAX_PLAYERS; i ++ )
            {
                if( PlayerInfo[i][pAdmin] < 1 || PlayerInfo[i][pHelper] < 1 )
                {
                    for ( new c = 0; c < 30; c++ ) // In loc de 30 pui cate linii vrei sa stearga
                    {
                                SendClientMessage(i, -1, " ");
                    }
                }
            }
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "Galaxy Omega: %s a sters chatul", sendername);
                SendClientMessageToAll(COLOR_LIGHTRED, string);
                //SendClientMessage(playerid,0x70AD52FF, "Chatul a fost sters cu succes!");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You're not a Admin so you cannot use this command!");
                return 1;
            }
        }
    }

Am bagat si tot degeaba. Tot imi sterge si mie chatul care sunt owner.

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.