06.05.2011, 05:22
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][pVIP] == 1) //Se nгo for pVIP trocar pela variбvel que define o vip
{
SendClientMessage(playerid, COLOR_YELLOW, "[BSL] Relatуrio prata enviado para os administradores.");
format(string, sizeof(string), "[Relato] prata %s(%d) relatou: %s", sendername,playerid, (result));
ABroadCast(COLOR_KICKBAN,string,1);
format(string, sizeof(string), "[Relato] prata %s(%d) relatou: %s", sendername,playerid, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
}
else if(PlayerInfo[playerid][pVIP] == 2) //Se nгo for pVIP trocar pela variбvel que define o vip
{
SendClientMessage(playerid, COLOR_YELLOW, "[BSL] Relatуrio ouro enviado para os administradores.");
format(string, sizeof(string), "[Relato] ouro %s(%d) relatou: %s", sendername,playerid, (result));
ABroadCast(COLOR_KICKBAN,string,1);
format(string, sizeof(string), "[Relato] ouro %s(%d) relatou: %s", sendername,playerid, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
}
else
{
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;
}