<?php
#Example: if UseUsernameForAuthentication=true
# !regex=^\[COP\].*
# Find all user with a nickname that begins with [COP]
# regex=^Gai.*
# Find all user with a username that begins with Gai
# See regular expression on web for more info how it work
?>
IF( $TeamTagStripR == !regex=^\[SC\].* )
THEN
IF( UserInGroup( "CP",$UserName ) != 1 )
THEN
privMsg( "^1You Are Not Allowed To Use The " . $Team . "^1 Tag");
cmdLFS("/msg ^1" . $UserName . " ^1Was Kicked For Using" );
cmdLFS("/msg ^1The " . $Team . " ^1Tag When Not A " . $Team . " ^1Member" );
cmdLFS("/kick " . GetCurrentPlayerVar("UserName") );
ENDIF
ENDIF
<?php
$TeamTagLenghtR = StrLen( "^*[^*S^*C]" );
$TeamTagStripR = substr( $NickName,0,$TeamTagLenghtR );
IF( $TeamTagStripR == "^*[^*S^*C]" )
THEN
IF( UserInGroup( "CP",$UserName ) != 1 )
THEN
privMsg( "^1You Are Not Allowed To Use The " . $Team . "^1 Tag");
cmdLFS("/msg ^1" . $UserName . " ^1Was Kicked For Using" );
cmdLFS("/msg ^1The " . $Team . " ^1Tag When Not A " . $Team . " ^1Member" );
cmdLFS("/kick " . GetCurrentPlayerVar("UserName") );
ENDIF
ENDIF
?>
<?php
IF( GetCurrentPlayerVar( "command" ) == "does not exist" )
THEN
privMsg( "^1Invalid Command! ^7Please Look At ^2!Help ^7For Commands!" );
ENDIF
?>
<?php
SetCurrentPlayerVar( "command","does not exist" );
?>
<?php
CASE "!add":
IF( UserInGroup( "tempadmin",$UserName ) == 1 && UserIsAdmin( $UserName ) == 1 )
THEN
IF( $argv != "" ) THEN
$idxSpace = indexOf( $argv, " ");
IF( $idxSpace != -1 ) THEN
$option = subStr( $argv,0,$idxSpace );
$argv = trim( subStr( $argv,$idxSpace ) );
SWITCH( $option )
CASE "registration":
IF( UserInGroup( "registeration",$argv ) == 1 )
THEN
privMsg( "^7User is already registered ");
ELSE
MoveUserToGroup( "registeration", $argv );
SaveGroupToFile( "registeration", "./registeration.txt" );
privMsg( "^7Added " . $argv . " To " . $option . " File Succesfully!!");
ENDIF
BREAK;
DEFAULT:
privMsg( "No such option for this command: " . $option );
BREAK;
ENDSWITCH
ELSE
privMsg( "Command needs more parameters" );
ENDIF
ENDIF
ELSE
privMsg( "^1Access Denied");
ENDIF
BREAK;
CASE "!re":
IF( UserInGroup( "tempadmin",$UserName ) == 1 && UserIsAdmin( $UserName ) == 1 )
THEN
IF( $argv != "" ) THEN
$idxSpace = indexOf( $argv, " ");
IF( $idxSpace != -1 ) THEN
$option = subStr( $argv,0,$idxSpace );
$argv = trim( subStr( $argv,$idxSpace ) );
SWITCH( $option )
CASE "registration":
IF( UserInGroup( "registeration",$argv ) == 1 )
THEN
RemoveUserFromGroup( "registeration" , $argv);
SaveGroupToFile( "registeration", "./registeration.txt" );
privMsg( "^7Removed " . $argv . " From " . $option . " File Succesfully!!");
ELSE
privMsg( "^1User not found in file");
ENDIF
BREAK;
DEFAULT:
privMsg( "No such option for this command: " . $option );
BREAK;
ENDSWITCH
ELSE
privMsg( "Command needs more parameters" );
ENDIF
ENDIF
ELSE
privMsg( "^1Access Denied");
ENDIF
BREAK;
?>