17.05.2013, 03:32
Ai...
pawn Код:
if(strcmp(cmd, "/relatorio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new sendername[MAX_PLAYER_NAME]
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[800];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, -1, "Uso Correto: /Relatуrio [Texto]");
return 0x01;
}
if(VARIAVEL PLAYER NORMAL)
{
format(string, sizeof(string), "[Relatуrio][%d] %s: %s",playerid, sendername, (result));
MensagemAdm(0xFFFF00FF,string);
}
if(VARIAVEL PLAYER VIP)
{
format(string, sizeof(string), "[Relatуrio][%d] %s: %s",playerid, sendername, (result));
MensagemAdm(0x057ABDAA,string);
}
if(VARIAVEL PLAYER SOCIO)
{
format(string, sizeof(string), "[Relatуrio][%d] %s: %s",playerid, sendername, (result));
MensagemAdm(0xFF0000FF,string);
}
}
return 0x01;
}
//////////////////////
MensagemAdm(cor, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(VARIAVEL ADM)
{
SendClientMessage(i, cor, string);
}
}
}
return 0x01;
}