The online racing simulator
[CODE] clan tag protection (needs some checking over)
i have added a clan tag protection to my lapper it requires krayy's save usergroup add-on

u can get it here if u don't have it http://www.lfsforum.net/showthread.php?t=61328

i am sorry if there is a bug in the coding i wrote this out on paper while i was at school during study hall


<?php 
Event OnLapperStart
()
GlobalVar $Team;

     
$Team =  "^0[^4S^0C]";
EndEvent

Event OnConnect
()
    
GlobalVar $TeamTagLenght;
  
GlobalVar $TeamTagStrip;
 
   
$TeamTagLenght StrLen$Team );
   
$NickName GetCurrentPlayerVar("NickName");
   
$TeamTagStrip substr$NickName,0,$TeamTagLenght );    
             
   IF( 
$TeamTagStrip == $Team )
   
THEN
            
IF( UserInGroup"CP",$userName ) != )
            
THEN
                    privMsg
"^1You Are Not Allowed To Use The " $Team "^1 Tag");
                    
cmdLFS("/msg ^1" $nickName " ^1Was Kicked For Using" );
                    
cmdLFS("/msg  ^1The " $Team " ^1Tag When Not A " $Team " ^1Member" );
                  
cmdLFS("/kick " GetCurrentPlayerVar("UserName") );
            ENDIF
   ENDIF
EndEvent
?>



<?php 
Event OnMSO
$text )
    
$userName GetCurrentPlayerVar("UserName");
    
UserGroupFromFile"member""./CP.txt" );

       CASE 
"!ad-member":
   IF( 
UserInGroup"tempadmin",$userName ) == )
   
THEN
   
IF( UserInGroup"member",$argv ) == )
   
THEN
   privMsg
"^7User is already A Member!!!");
       ELSE
   
MoveUserToGroup"member",$argv );
   
SaveGroupToFile"member""./CP.txt" );
   
privMsg"^7Added New Member succesfully!!!");
   ENDIF
   ELSE
              
privMsg"^1Access Denied");
   ENDIF
   BREAK;
  CASE 
"!re-member":
  IF( 
UserInGroup"tempadmin",$userName ) == )
   
THEN
   
IF( UserInGroup"member",$argv ) == )
              
THEN
   privMsg
"^7Removed User succesfully!!");
                              
RemoveUserFromGroup"member" $argv);
                                
SaveGroupToFile"member""./CP.txt" );
   ELSE
   
privMsg"^1User not found in Admin file");
   ENDIF
   ELSE
              
privMsg"^1Access Denied");
   ENDIF
   BREAK;
EndEvent
?>



FGED GREDG RDFGDR GSFDG