The online racing simulator
[Solved] Some questions
Is it possible to do the following, and if so, how:
  • Get a list of usernames and their associated driver names
  • Prevent a sent message by a player from being displayed
I'm thinking of creating a very basic moderation tool..
** Best answer **
It is possible to show the list of connected players.

-Display a list of player in the chatlog
-Display a list of button with the playernames.

The examplecode below will be executed when typing the !lop command. Event OnMSO ($userName, $text ) # Player event


<?php 
#Display list of players in the chatlog
CASE "!lop":
    
$LoP GetListOfPlayers("U");
    
privmsg("-----[List of connected players]-----");
    FOREACH (
$Player IN $LoP)
        
$PLYuserName $Player["value"];
        
privmsg(GetPlayerVar($PLYuserName,"NickName")." ^8(".$PLYuserName.")");                        
    ENDFOREACH
BREAK;

#Create a list of buttons with the playernames.
CASE "!lop":
    
$hgt 80;
    
$LoP getListOfPlayers("U");
    
privmsg("-----[List of buttons with connected players]-----");
    FOREACH(
$Player IN $LoP)
        
$PLYuserName $Player["value"];
        
openButton($userName,"Btn_".$PLYuserName,170,$hgt,30,4,1,-1,16+64,GetPlayerVar($PLYuserName,"NickName")." ^8(".$PLYuserName.")");
        
$hgt=$hgt+4;
    ENDFOREACH
BREAK;
?>

If it not possible to prevent displaying messages (chatlog) from players.
This thread is closed

FGED GREDG RDFGDR GSFDG