Jump to content
  • 0

Problema ClearChat


HartMon

Question

Problema intalnita (descriere):Problema la Clear Chat
Ero(area / rile) / warning-(ul / urile):Nam erori doar ca nu se sterge Chat
Liniile de cod / sursa / script-ul(obligatoriu):Stiu am pus tot 

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

{
   if(IsPlayerConnected(playerid))
{
if(PlayerData[playerid][pAdmin] >= 1 || PlayerData[playerid][pAgent] >= 1)
{
 
   for(new i = 0; i <= MAX_PLAYERS; i++)
   {
       if(IsPlayerConnected(i))
{
   if(PlayerData[pAdmin] < 1)
   {
for( new j = 0; j <= 500; j++)
{
SendClientMessage(i, COLOR_WHITE, "");
}
}
}
}
GameTextForAll("Chat cleared!", 1000,1);
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "{43D1D1}AdmWarning:{FFFFFF} %s a sters chatul.", sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
return 1;
}
else
{
SendError(playerid,cmd);
return 1;
}
}
else
{
   SendClientMessage(playerid, COLOR_RED, "Logheaza-te mai intai!");
}
return 1;
}

 

 

Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Daa nu am reusit nimic am creat niste buguri mai mari asa ca am loat backup 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

{
 if(IsPlayerConnected(playerid))
{
if(PlayerData[playerid][pAdmin] >= 1 || PlayerData[playerid][pAgent] >= 1)
{
 
 for(new i = 0; i <= MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
{
 if(PlayerData[pAdmin] < 1)
 {
for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE," ");
}
}
}
}
GameTextForAll("Chat cleared!", 1000,1);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "{43D1D1}AdmWarning:{FFFFFF} %s a sters chatul.", sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
return 1;
}
else
{
SendError(playerid,cmd);
return 1;
}
}
else
{
 SendClientMessage(playerid, COLOR_RED, "Logheaza-te mai intai!");
}
return 1;
}
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.