public OnPlayerText( playerid, text[ ] ) {
new iNums;
for( new x = 0; x < strlen( text ); ++x ) {
if( text[ x ] < \'0\' || text[ x ] > \'9\' ) continue;
++iNums;
}
if( iNums > 8 ) {
SendClientMessage( playerid, COLOR_RED, \"Maximum 8 számjegyet írhatsz egy üzenetbe!\" );
return 0;
}
return 1;
}
By :Roni
E : most nézem hogy csak kickel :D
Fade シ
Nos Gamestar kódját módosítva, és a kettospont ötletet felhasználva megírtam a scriptet.
Teszteltem muködik. Csak akkor bannol ha írsz ki portot mellé. 1.2.3.4:1111 meg ilyeneknél nem bannol (mivel hát 9nél többnek kell lennie a számnak.)
Nos itt is van:
[/quote]
http://solidfiles.com/d/78mv/
Ez jó ez tetszik, csak nekem ezt a hibát írja.
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: \";\", but found \")\"
fatal error 107: too many error messages on one line
OnPlayerText alá:
new szamok=0,pontok=0, kettospont=0;
for(new ch=0; ch<strlen(text); ch++) if(text[ch]>=\'0\' && text[ch]<=\'9\')szamok++; else if(text[ch]==\'.\')pontok++; else if(text[ch]==\':\')kettospont++;
if(szamok>=9 && pontok>=3 && kettospont==1) Kick(playerid);
#include <a_samp>
new str[128];
public OnPlayerText(playerid, text[])
{
if(anty(text) && !IsPlayerAdmin(playerid))
{
format(str,256,\"*** Player %s has been banned from the Server. Reason: advertising IP / PAGE\",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;
}
Tessék ezt egy angol samp forumrol vettem le remélem ez jó lesz :) Ha segitettem mehet a + ! :)