22.06.2010, 20:00
^i dont understand how to make the ip part help<.<
stock CountOccurrence(text[],ch) { new count = 0; for(new i=0;i<strlen(text);i++) { if (text[i] == ch) count++; } return count; } Script_OnPlayerText(playerid, text[]) { if(CountOccurrence(text,'.')>2 && CountOccurrence(text,':')>1) { if(!IsPlayerAdmin(playerid)) { SendClientMessage(playerid,0xFF0000AA,"Error: We do not allow the posting of IP addresses here"); Kick(playerid); return 0; } } return 1;
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAN~1.PWN(1456) : warning 203: symbol is never used: "Script_OnPlayerText" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings.
stock CountOccurrence(text[],ch) {
new count = 0;
for(new i=0;i<strlen(text);i++) {
if (text[i] == ch) count++;
}
return count;
}
public OnPlayerText(playerid, text[]) {
if(CountOccurrence(text,'.')>2 && CountOccurrence(text,':')>1) {
if(!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid,0xFF0000AA,"Error: We do not allow the posting of IP addresses here");
Kick(playerid);
return 0;
}
}
return 1;
Originally Posted by Kar
typed in my ip prefectly
72.51.79.182 nothing happened wtf why is there isplayeradmin in there for? |