24.01.2018, 23:06
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/relatorio", true) == 0)
{
new texto=strval(cmdtext);
new string[256];
static nome[24];
GetPlayerName(playerid, nome, 24);
if(!strlen(cmdtext))return SendClientMessage(playerid, -1, "Use: /relatorio [Texto]");
else
{
format(string,256,"[Relatorio] %s: %s",nome,texto);
MensagemParaAdmin(-1,string);
}
return 1;
}
return 0;
}
forward MensagemParaAdmin(color,const string[]);
public MensagemParaAdmin(color,const string[])
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}