Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

/cc / clearchat ?


Question

Posted

Salut, de cateva zile ma tot chinui cu comanda asta, /cc incerc sa fac una pentru un server de GF modificat care sa stearga chatul doar jucatorilor nu si adminlor, uitati ce am facut pana acum:

[pawn] if(strcmp(cmd, "/clearchat", true) == 0 || strcmp(cmd, "/cc", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

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

{

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

{

if(IsPlayerConnected(j))

{

if(PlayerInfo[j][pAdmin] == 0)

{

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

SendClientMessage(i, COLOR_WHITE, " ");

}

else (PlayerInfo[j][pAdmin] >= 1 )

{

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

                format(string, sizeof(string), "AdmWarning: %s has cleared the chat.", sendername);

    ABroadCast(COLOR_LIGHTRED,string,1);

                return 1;

                }

  }

}

  }

else

{

SendClientMessage(playerid, -1, "{F81414}[DENIED]:{FFFFFF} You are not authorized to use that command!");

  }

}

  else

        {

SendClientMessage(playerid, COLOR_GRAD1, "  You are not Logged in !");

        }

return 1;

}[/pawn]

V-as fi tare recunoscator daca ma ajutati.

4 answers to this question

Recommended Posts

Posted

Salut, de cateva zile ma tot chinui cu comanda asta, /cc incerc sa fac una pentru un server de GF modificat care sa stearga chatul doar jucatorilor nu si adminlor, uitati ce am facut pana acum:

[pawn] if(strcmp(cmd, "/clearchat", true) == 0 || strcmp(cmd, "/cc", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

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

{

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

{

if(IsPlayerConnected(j))

{

if(PlayerInfo[j][pAdmin] == 0)

{

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

SendClientMessage(i, COLOR_WHITE, " ");

}

else (PlayerInfo[j][pAdmin] >= 1 )

{

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

                format(string, sizeof(string), "AdmWarning: %s has cleared the chat.", sendername);

    ABroadCast(COLOR_LIGHTRED,string,1);

                return 1;

                }

  }

}

  }

else

{

SendClientMessage(playerid, -1, "{F81414}[DENIED]:{FFFFFF} You are not authorized to use that command!");

  }

}

  else

        {

SendClientMessage(playerid, COLOR_GRAD1, "  You are not Logged in !");

        }

return 1;

}[/pawn]

V-as fi tare recunoscator daca ma ajutati.

PROBLEME GODFATHER REPORTED

youtube.com/secretofficial1 < - SECRET CHANNEL !

Posted

comanda /clearchat e in orice GM!

if (strcmp("/clean", cmdtext, true == 0) {
               for(new i=0; <50; i++) SendClientMessageToAll(0x000000AA, " ");
		return 1; }

468833_437698_362328_hiphop.jpg
Posted

comanda /clearchat e in orice GM!

if (strcmp("/clean", cmdtext, true == 0) {
               for(new i=0; <50; i++) SendClientMessageToAll(0x000000AA, " ");
		return 1; }
Nu stii, nu te baga. Incearca asa:
if( strcmp( cmdtext, "/clearchat", true ) == 0 || strcmp( cmdtext, "/cc", true ) == 0 )
{
	if( PlayerInfo[ playerid ][ pAdmin ] == 0 ) return SendClientMessage( playerid, -1, "{F81414}[DENIED]:{FFFFFF} You are not authorized to use that command!" );

	for( new j = 0; j < MAX_PLAYERS; j ++ )
	{
		if( !IsPlayerConnected( j ) ) continue;

		if( PlayerInfo[ j ][ Admin ] == 0)
		{
			for( new i = 0; i < 70; i ++ )
			SendClientMessage( i, COLOR_WHITE, " " );
		}
		else
		{
			GetPlayerName( playerid, sendername, sizeof( sendername ) );
			format( string, sizeof( string ), "AdmWarning: %s has cleared the chat.", sendername );
			ABroadCast( COLOR_LIGHTRED, string, 1 );
		}
	}
	return 1;
}

Posted

Esti foarte tare  ![]stuntman[]!, mersi mult de tot.

SendClientMessage( i, COLOR_WHITE, " " ); - aici trebuia in loc de ' i ' ' j ', dar merge perfect. mersi mult.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.