Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: ninjaban
1. [DM] NinjaBan
Witam mam taki problem jak dodac ninjaban:

Oto kod:

[code]public OnPlayerText(playerid, text[]) {
[...]
if (ContainsIP(text)) {
SendClientMessage(playerid, pData[playerid][adminLevel]==LEVEL_ADMIN3 ? 0xA01010FF : 0x606060FF, buffer);
MSGToAdmins(COLOR_ADMIN, buffer, true, LEVEL_ADMIN2);
format(buffer, sizeof buffer, "Ninjabanowana proba reklamy przez {b}%s (%d){/b}.", GetPlayerNick(playerid), playerid);
MSGToAdmins(COLOR_ADMIN, buffer, false, LEVEL_ADMIN2);
return 0;
}
}
stock ContainsIP(const string[]){
static RegEx:rCIP;
if (!rCIP) rCIP = regex_build(".*[0-9]{1,3}[^0-9]{1,3}[0-9]{1,3}[^0-9]{1,3}[0-9]{1,3}[^0-9]{1,3}[0-9]{1,3}[^0-9]{1,7}[0-9]{3,5}.*");
return regex_match_exid(string, rCIP);
}[/code]


A oto b?edy

[code]C:UsersWojtVideosFullDM by Mlody626nowapawnoincludezcmd.inc(92) : warning 219: local variable "pos" shadows a variable at a preceding level
C:UsersWojtVideosFullDM by Mlody626nowapawnoincludesscanf2.inc(218) : warning 219: local variable "string" shadows a variable at a preceding level
C:UsersWojtVideosFullDM by Mlody626nowapawnoincludesscanf2.inc(218) : warning 219: local variable "string" shadows a variable at a preceding level
C:UsersWojtVideosFullDM by Mlody626nowapawnoincludesscanf2.inc(278) : warning 219: local variable "string" shadows a variable at a preceding level
C:Us...