05.07.2012, 14:39
pawn Код:
if(strcmp(cmd, "/relatorio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
if(GetPVarInt(playerid, "UsouCMD") == 1) return SendClientMessage(playerid, -1, "Voce ja usou o cmd ");
{
SetTimerEx("usarcmd",20000,false,"i",playerid);
SetPVarInt(playerid, "UsouCMD" , 1);
return 1;
}
SendClientMessage(playerid, COLOR_GREY, "Voce nгo estб logado!");
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, "USE: /relatorio [texto]");
return 1;
}
format(string, sizeof(string), "[ATENЗГO] ==> Relatorio de %s(%d): %s", sendername, playerid, (result));
ABroadCast(COLOR_LIGHTBLUE,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Sua mensagem foi enviada б administraзгo,Aguarde uma resposta.");
}
return 1;
}
// Bote no final ou no comeзo
forward usarcmd(playerid); public usarcmd(playerid) return SetPVarInt(playerid, "UsouCMD", 0);