25.10.2012, 20:36
Galera to tentando arrumar meu codigo aki do /relatorio mais nao ta dando certo alguem pode explicar ou arrumar pra min ? Codigo ta sem ant flood eu tentei colocar um ai mais nao deu
Valeu abraзos
Код:
if(strcmp(cmd, "/relatorio", true) == 0 || strcmp(cmd, "/relatorio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб logado!");
return true;
}
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 true;
}
if(PlayerInfo[playerid][pVIP] == 1)
{
new lol;
lol = PlayerInfo[playerid][pVIP];
format(string, sizeof(string), "Relatorio VIP de %s - ID[%d]: %s ", sendername, playerid, lol, (result));
//HelperBroadCast(COLOR_YELLOW,string,1);
ABroadCast(COLOR_LIGHTBLUE,string,1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu relatorios VIP foi enviado aos admins..");
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
new lol;
lol = PlayerInfo[playerid][pVIP];
format(string, sizeof(string), "Relatorio VIP-POWER de %s - ID[%d]: %s ", sendername, playerid, lol, (result));
//HelperBroadCast(COLOR_YELLOW,string,1);
ABroadCast(COLOR_LIGHTBLUE,string,1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu relatorio VIP-POWER foi enviado aos admins..");
}
else
{
format(string, sizeof(string), "Relatorio de %s(%d): %s ", sendername, playerid, (result));
//HelperBroadCast(COLOR_YELLOW,string,1);
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Seu relatorio foi enviado aos admins..");
}
}
return true;
}

