Jump to content
  • 0

pomoc OnPlayerText


Macko

Dotaz

public OnPlayerText(playerid, text[])
{
if(IsPlayerConnected(playerid))
{
if(strfind(text,"k***t", true) != -1 || strfind(text,"pica", true) != -1 || strfind(text,"kkt", true) != -1 || strfind(text,"kkte", true) != -1 || strfind(text,"zmrd", true) != -1 || strfind(text,"zmrde", true) != -1 || strfind(text,"kokote", true) != -1 || strfind(text,"pico", true) != -1)
{
new string[256];
PlayerInfo[playerid][pVarovanie]++;
format(string, 256, "%d/3 [ Varovani ][ AntiNoob ] Zpráva filtrována", PlayerInfo[playerid][pVarovanie]);
SendClientMessage(playerid, COLOR_RED, string);
if(PlayerInfo[playerid][pVarovanie] >= 3) Kick(playerid);
}
return 0;
}
}
else
{
new string[128];
format(string, sizeof(string), "[%d] %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
return 0;
}

 

Dobrý Večer,

Ako by som to opravil by mi to neukazovali errory?

Dakujem. ;)

Link to comment
Share on other sites

9 odpovědí na tuto otázku

Recommended Posts

  • 0

#include 
#define COLOR_RED 0xFF0000AA
enum pInfo
{
pPass,
pCash,
pAdmin,
pScore,
pKills,
pDeaths,
pMinuty,
pHodiny,
pDny,
pSekundy,
pVarovanie,
}
new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerText(playerid, text[])
{
if(IsPlayerConnected(playerid))
{
if(strfind(text,"k***t", true) != -1 || strfind(text,"pica", true) != -1 || strfind(text,"kkt", true) != -1 || strfind(text,"kkte", true) != -1 || strfind(text,"zmrd", true) != -1 || strfind(text,"zmrde", true) != -1 || strfind(text,"kokote", true) != -1 || strfind(text,"pico", true) != -1)
{
new string[256];
PlayerInfo[playerid][pVarovanie]++;
format(string, 256, "%d/3 [ Varovani ][ AntiNoob ] Zpráva filtrována", PlayerInfo[playerid][pVarovanie]);
SendClientMessage(playerid, COLOR_RED, string);
if(PlayerInfo[playerid][pVarovanie] >= 3) Kick(playerid);
}
}
return 0;
}
else
{
new string[128];
format(string, sizeof(string), "[%d] %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
return 0;
}

 

Tu je to cele

Link to comment
Share on other sites

  • 0
#include <a_samp>
#define COLOR_RED 0xFF0000AA
enum pInfo
{
pPass,
pCash,
pAdmin,
pScore,
pKills,
pDeaths,
pMinuty,
pHodiny,
pDny,
pSekundy,
pVarovanie,
}
new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerText(playerid, text[])
{
if(IsPlayerConnected(playerid))
{
if(strfind(text,"k***t", true) != -1 || strfind(text,"pica", true) != -1 || strfind(text,"kkt", true) != -1 || strfind(text,"kkte", true) != -1 || strfind(text,"zmrd", true) != -1 || strfind(text,"zmrde", true) != -1 || strfind(text,"kokote", true) != -1 || strfind(text,"pico", true) != -1)
{
new string[128];
format(string, 128, "%d/3 [ Varovani ][ AntiNoob ] Zpráva filtrována", PlayerInfo[playerid][pVarovanie]);
SendClientMessage(playerid, COLOR_RED, string);
PlayerInfo[playerid][pVarovanie]++;
if(PlayerInfo[playerid][pVarovanie] >= 3) Kick(playerid);
}}
else
{
new string[128];
format(string, sizeof(string), "[%d] %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
}
return 0;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...