08.02.2017, 23:03
pawn Код:
CMD:duvida(playerid, params[])
{
new id, duvida[50], playername[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
if(sscanf(params, "us[50]", id, duvida)) return SendClientMessage(playerid, -1, "Use: /duvida [TEXTO]");
if(IsPlayerAdmin(playerid) || Player[playerid][pAdmin >= 1 ) return SendClientMessage(playerid, -1, "Vocк й da administraзгo!");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(duvida, sizeof(duvida), "%s enviou um dъvida : %s", playername, duvida);
SendAdminMessage(-1, duvida);
}
return 1;
}
stock SendAdminMessage(cor, mensagem[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pAdmin] >= 1 || IsPlayerAdmin(i))
{
SendClientMessage(i, cor, mensagem);
}
}
}
return 0;
}