06.05.2011, 08:55
Coloquei as cores ai:
pawn Код:
if(strcmp(cmd,"/relato",true) ==0 || strcmp(cmd,"/re",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_RED, "[Fail] Vocк foi mutado por um admin, nгo pode falar.");
return 1;
}
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, COLOR_GRAD2, "USO: /relato [texto]");
return 1;
}
if(ReduceTime[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк precisa esperar 3 segundos para usar esse comando denovo !");
return 1;
}
if(PlayerInfo[playerid][pDonateRank] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "[BSL] Relatуrio enviado para os administradores.");
format(string, sizeof(string), "Vip Bronze %s(%d) relatou: %s", sendername,playerid, (result));
ABroadCast(0xAD4E0FFF,string,1);
format(string, sizeof(string), "Vip Bronze %s(%d) relatou: %s", sendername,playerid, (result));
SendClientMessage(playerid, 0xAD4E0FFF, string);
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
return 1;
}
else if(PlayerInfo[playerid][pVip] == 2)
{
SendClientMessage(playerid, COLOR_YELLOW, "[BSL] Relatуrio enviado para os administradores.");
format(string, sizeof(string), "Vip Prata %s(%d) relatou: %s", sendername,playerid, (result));
ABroadCast(0x9B9B9BFF,string,1);
format(string, sizeof(string), "Vip Prata %s(%d) relatou: %s", sendername,playerid, (result));
SendClientMessage(playerid, 0x9B9B9BFF, string);
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
return 1;
}
else if(PlayerInfo[playerid][pVip] == 3)
{
SendClientMessage(playerid, COLOR_YELLOW, "[BSL] Relatуrio enviado para os administradores.");
format(string, sizeof(string), "Vip Ouro %s(%d) relatou: %s", sendername,playerid, (result));
ABroadCast(0xF2D91DFF,string,1);
format(string, sizeof(string), "Vip Ouro %s(%d) relatou: %s", sendername,playerid, (result));
SendClientMessage(playerid, 0xF2D91DFF, string);
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
return 1;
}
SendClientMessage(playerid, COLOR_YELLOW, "[BSL] Relatуrio enviado para os administradores.");
format(string, sizeof(string), "[Relato] %s(%d) relatou: %s", sendername,playerid, (result));
ABroadCast(COLOR_KICKBAN,string,1);
format(string, sizeof(string), "[Relato] %s(%d) relatou: %s", sendername,playerid, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
return 1;
}