Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //========== onplayerjoin =============
- Clan <- GetTag( player.Name );
- if ( Clan && !IsClanRegister( Clan.tolower() ) ) MessagePlayer( "Use /cmds to see the list of available commands", player );
- else if ( Clan && IsClanRegister( Clan.tolower() ) ) MessagePlayer( "", player );
- function GetTag( strPlayer )
- {
- local
- D_DELIM = regexp(@"([\[(=^<]+\w+[\])=^>]+)"),
- S_DELIM = regexp(@"(\w.+[.*=]+)"),
- D_DELIM_res = D_DELIM.capture(strPlayer),
- S_DELIM_res = S_DELIM.capture(strPlayer);
- if ( D_DELIM_res != null )
- {
- return strPlayer.slice( D_DELIM_res[ 0 ].begin + 1, D_DELIM_res[ 0 ].end - 1 );
- }
- else if ( S_DELIM_res != null )
- {
- return strPlayer.slice( S_DELIM_res[ 0 ].begin, S_DELIM_res[ 0 ].end - 1 );
- }
- else return null;
- }
Add Comment
Please, Sign In to add comment