Show a what command player uses on irc
#4

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success// The Main function.
// opening bracket
    
if(strlen(cmdtext) && success// if player typed a command and if it is a success.
    
{
        new 
name[MAX_PLAYER_NAME], string[75]; 
        
        
GetPlayerName(playeridnameMAX_PLAYER_NAME); // get the player name to see who typed the command.
        
format(stringsizeof(string), "[CmdTxt]: %s[%i] typed the command: /%s"nameplayeridcmdtext);
        for(new 
0MAX_PLAYERSi++)  // we are making a loop to see who are the admins in game.
        
{
            if(
IsPlayerIRCAdm....) return SendIRCMessage(...); // here is the place where you would add your IRC message to the irc admins.
        
}
    }
    return 
1;
// closing bracket 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)