Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-03-11, 14:35


arkopi







Wiek: 31
Na forum: 5579 dni
Posty: 177

Piwa: 60

Respekt: 50

Ostrzeżeń: 20%
Witam mam problem z antyspamem i antyreklama wgralem do mapki na starym serwerze dziala jak wpisze np adres forum lub ip ale jak wgram mapke do nowego to juz nie dziala prosze o pomoc daje :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-11, 14:41


kurczak1324







Wiek: 29
Na forum: 5819 dni
Posty: 202
Nick w MP: Izzy

Piwa: 671

Respekt: 45,3

Czy zechce nam Pan ?askawie poda? kod?

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-11, 14:57


arkopi







Wiek: 31
Na forum: 5579 dni
Posty: 177

Piwa: 60

Respekt: 50

Ostrzeżeń: 20%
antyreklama



Kod:

new str[128];


public OnPlayerText(playerid, text[])
{


if(anty(text) && !IsPlayerAdmin(playerid))
{
format(str,256,"*** Gracz %s zosta? zbanowany z Servera. Pow?d : Reklamowanie IP/STRONY",PlayerName(playerid));
SendClientMessageToAll(0xFF0000FF, str);
Ban(playerid);
return 0;
}


return 1;
}

stock anty(string[])
{
if(strfind(string,"www.",true)!=-1 || strfind(string,"http://",true)!=-1 || strfind(string,".com",true)!=-1 || strfind(string,".net",true)!=-1 || strfind(string,"91.",true)!=-1 || strfind(string,"195.",true)!=-1 || strfind(string,".pl",true)!=-1|| strfind(string,".org",true)!=-1)
return true;
return false;
}


stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}




antyspam

Kod:

public OnPlayerText(playerid, text[])
{
#if INCLUDE_ADMINS == false
if(!IsPlayerAdmin(playerid))
{
#endif
if(napisal[playerid] == 0)
{
napisal[playerid] = 1;
napisalminustimer[playerid] = SetTimerEx("napisalminus", MSG_TIME_LIMIT, false, "i", playerid);
}

else if(napisal[playerid] == 1)
{
KillTimer(napisalminustimer[playerid]);
napisal[playerid] = 2;
napisalminustimer[playerid] = SetTimerEx("napisalminus", MSG_TIME_LIMIT, false, "i", playerid);
SendClientMessage(playerid, 0xFF0000FF, "[AntySPAM]: Zosta?e? ostrze?ony za SPAM/Flood! Nast?pnym razem zostaniesz wyrzucony!");
}

else if(napisal[playerid] == 2)
{
new string[128];
format(string, sizeof string, "Gracz %s (ID: %d) zosta? automatycznie wyrzucony! | Pow?d: SPAM/Flood!", PlayerName(playerid), playerid);
SendClientMessageToAll(0xFF0000FF, string);
SendClientMessage(playerid, 0xFFF000FF, "[AntySPAM]: Zosta?e? automatycznie wyrzucony! | Pow?d: SPAM/Flood!");
napisal[playerid] = 0;
Kick(playerid);
}
#if INCLUDE_ADMINS == false
}
#endif
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
#if INCLUDE_ADMINS == false
if(!IsPlayerAdmin(playerid))
{
#endif
if(napisalcmd[playerid] == 0)
{
napisalcmd[playerid] = 1;
napisalcmdminustimer[playerid] = SetTimerEx("napisalcmdminus", CMD_TIME_LIMIT, false, "i", playerid);
}

else if(napisalcmd[playerid] == 1)
{
KillTimer(napisalcmdminustimer[playerid]);
napisalcmd[playerid] = 2;
napisalcmdminustimer[playerid] = SetTimerEx("napisalcmdminus", CMD_TIME_LIMIT, false, "i", playerid);
SendClientMessage(playerid, 0xFF0000FF, "[AntySPAM]: Zosta?e? ostrze?ony za SPAM/Flood komendami! Nast?pnym razem zostaniesz wyrzucony!");
}

else if(napisalcmd[playerid] == 2)
{
new string[128];
format(string, sizeof string, "Gracz %s (ID: %d) zosta? automatycznie wyrzucony! | Pow?d: SPAM/Flood komendami!", PlayerName(playerid), playerid);
SendClientMessageToAll(0xFF0000FF, string);
SendClientMessage(playerid, 0xFFF000FF, "[AntySPAM]: Zosta?e? automatycznie wyrzucony! | Pow?d: SPAM/Flood komendami!");
napisalcmd[playerid] = 0;
Kick(playerid);
}
#if INCLUDE_ADMINS == false
}
#endif
return 0;
}


Postaw piwo autorowi tego posta
 

 
Tagi: antyspam :: antyreklama
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku