Acho que ira te ajuda nao sei amigo
PHP код:
if(strcmp(cmd, "/Duvida", true) == 0 || strcmp(cmd, "/Duvidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid][pLogged] == false)
{
SendClientMessage(playerid, COR_ERRO, "Vocк 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, AzulEscuro, "USO: /duvida [texto]");
return 1;
}
format(string, sizeof(string), "{00FFFF}» DЪVIDA DE %s [ID: %d]: %s", sendername, playerid, result);
ABroadCast(0xFFFF66FF,string,1);
SendClientMessage(playerid, 0x80FF80AA, "» Seu dъvida foi enviada para a Administraзгo.");
Player[playerid][DelayRelato] = true;
SetTimerEx("TempoRelato", 60000, 0, "i", playerid);
}
return 1;
}
if(strcmp(cmd, "/Relato", true) == 0 || strcmp(cmd, "/Relatorio", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
GetPlayerName(playerid, sendername, sizeof(sendername));
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, AzulEscuro, "[USE] /Relato [texto]");
return 1;
}
if(Player[playerid][DelayAsay] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Flood detectado!");
if(Player[playerid][pLogged] == true)
{
format(string, sizeof(string), "{00FFFF}» [RELATO] DE {00FFFF}%s {00FFFF}[ID: %d]: {00FFFF}%s", sendername, playerid, result);
SendMessageToAdmins(COR_ERRO,string);
SendClientMessage(playerid, 0x80FF80AA, "» Seu relatуrio foi enviado com sucesso a Administraзгo.");
Player[playerid][DelayAsay] = true;
SetTimerEx("TempoAsay", 60000, 0, "i", playerid);
}
else
{
SendClientMessage(playerid, COR_ERRO, "Vocк tem que estar logado para usar este comando!");
}
return 1;
}