18.06.2011, 21:16
pawn Код:
if(strcmp(cmd, "/bug", true) == 0)
{
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "USE: /bug texto");
new offset = idx, result[128], string[0x3C*3], length = strlen(cmdtext), nome[MAX_PLAYER_NAME];
while ((idx < length) && (cmdtext[idx] <= ' ')) {
idx++;
}
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, -1, "USE: /bug [bug]");
new y,m,d, h,mi,s;
getdate(y,m,d); gettime(h,mi,s); GetPlayerName(playerid, nome, sizeof(nome));
format(string, sizeof(string),"(%d/%d/%d)[%d:%d:%d] BUG de %s: %s",d,m,y,h,mi,s,nome, (result));
BugsLog(string);
return 1;
}