Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dcmd_a(playerid, params[])
- {
- if(level[playerid] < 1) return 0;
- new value[128];
- if(sscanf(params, "s", value)) {SendMsg(playerid, COLOR_RED, "%s: /a [%s]", usage, cmdmessage); return 1;}
- new string[128];
- format(string, 128, adminchat, RPN(playerid), playerid, value);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && level[i] > 0)
- {
- SendClientMessage(i, COLOR_GREEN, string);
- }
- }
- if(logging)
- {
- new File:log = fopen("\\bAdmin\\log.txt", io_append);
- new year, month, day, hour, minute, second;
- gettime(hour, minute, second);
- getdate(year, month, day);
- new sendmsg[256];
- format(sendmsg, 256, "%i/%i/%i %i:%i:%i - %s\r\n", day, month, year, hour, minute, second, string);
- fwrite(log, sendmsg);
- fclose(log);
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment