25.05.2018, 05:13
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], 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(playerid, name, MAX_PLAYER_NAME); // get the player name to see who typed the command.
format(string, sizeof(string), "[CmdTxt]: %s[%i] typed the command: /%s", name, playerid, cmdtext);
for(new i = 0; i < MAX_PLAYERS; i++) // 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