Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/reportarbug", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- return true;
- }
- getdate(Ano, Mes, Dia);
- gettime(Hora, Minuto, Segundo);
- if(PlayerInfo[playerid][pConnectTime] >= 0)
- {
- new OPS[256];
- SendClientMessage(playerid, COLOR_WHITE, "Obrigado por reportar o bug, iremos verificar o mais rapido!");
- SendClientMessage(playerid, COLOR_WHITE, "Entraremos em contato com voce. Aguarde!");
- new File:filebug;
- filebug = fopen("BUGS.txt",io_append);
- format(OPS, 256, "//>__________________ [ %d/%d/%d as %d:%d:%d ] __________________<\n\n//Reportado por: %s\n Suposto BUG: %s\n\n",
- Dia, Mes, Ano,
- Hora, Minuto, Segundo,
- PlayerName(playerid),
- result);
- fwrite(filebug,OPS);
- fclose(filebug);
- SendClientMessage(playerid, COLOR_AZULCLARO, "BUG salvo com sucesso!");
- return true;
- }
- else
- {
- SendClientMessage(playerid, COLOR_BRANCO, "Você precisa ter mais de 1 hora jogada para relatar um BUG");
- return true;
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment