25.08.2013, 03:09
pawn Код:
if(strcmp(cmd, "/reportar", 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[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, Vermelho, "[ > ] Use: /reportar [ID] [Denuncia]");
return 1;
}
if(vip[playerid] < 1)
{
format(string, sizeof(string), "{FFD39B}• %s ID %d Reportando: %s ", sendername, playerid, (result));
Reportar(0xFF8000AA,string,1);
SendClientMessage(playerid, amarelo, "[ INFO ] Jogador Reportado com Sucesso! Obrigado!");//Coloque a Mensagem que quiser!
}
else if(vip[playerid] >= 1)
{
format(string, sizeof(string), "{FFD39B}• %s ID %d Reportando: %s ", sendername, playerid, (result));
ABroadCast(Amarelo,string,1);
SendClientMessage(playerid, roxo, "[ INFO ] Jogador Reportado com Sucesso! Obrigado!");//Coloque a Mensagem que quiser!
}
}
return 1;
}