01.03.2012, 11:29
So how to use it in here?
Is that how to use it?
pawn Код:
CMD:o(playerid, params[])
{
new SenderName[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,SenderName,sizeof(SenderName));
if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY,"Usage: /o [OOC CHAT]");
if(oocon == 1)
{
new ipfind = strfind(params, ".", true);
new portfind = strfind(params, ":", true);
if(ipfind != -1 && portfind != -1 && HasNum(params) == true)
{
if(PlayerInfo[playerid][AdminLevel] < 3)
{
new string43[128];
format(string43, sizeof(string43), "%s just got kicked for Advertising by **AntiCheat V2.0**", SenderName);
ProxDetector(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
SendClientMessage(playerid, COLOR_RED, "Advertising is not allowed!");
Kick(playerid);
}
}
pawn Код:
stock bool:HasNum( str[] )
{
for ( new i, l = strlen( string ); i != l; i++ )
if ( str[i] >= '0' && str[i] <= '9' ) return(true);
return(false);
}