Jump to content
  • 0

pomoc Anti-Reklama [Farebný Chat]


Gredo

Dotaz

Dobrý deň. Mám problém. Neviem ako mám urobiť anti-reklamu do farebného chatu. Farebný chat mám spravený takto:

 

 

public OnPlayerText(playerid, text[])
{
if(Chat[playerid] == 1)
{
format(sting,256, "{FFFFFF}[ Hráč ] {FFFF00}%s", text);
SendPlayerMessageToAll(playerid, sting);
}

 

Samozrejme pokračuje to, mám to na viac farieb. Potreboval by som pomôcť. Vopred ďakujem.

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0

Anti reklamu spravíš takto:

public OnPlayerText(playerid, text[])
{
    if(0 <= strfind(text, "www.", false, 0))
    {
		    SendClientMessage(playerid, 0xE10000AA, "Reklama je zakázaná!");
		    return 0;
    }
    if(0 <= strfind(text, "WWW.", false, 0))
    {
		    SendClientMessage(playerid, 0xE10000AA, "Reklama je zakázaná!");
		    return 0;
    }
 return 1;
}

  • Líbí se mi to! (+1) 2
Link to comment
Share on other sites

  • 0

nebylo by jednodušší toto: :d

public OnPlayerText(playerid, text[])
{
     if(0 <= strfind(text, "www.", true, 0))
     {
             SendClientMessage(playerid, 0xE10000AA, "Reklama je zakázaná!");
             return 0;
     }
return 1;
}
Link to comment
Share on other sites

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