Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public adminChat(string[], color) // Send a msg to every online admin
- {
- foreach(new i : Player)
- {
- if(PlayerInfo[i][pAdminlvl] > 0 || IsPlayerAdmin(i)) // change this PlayerInfo[i][pAdminlvl] > 0
- {
- SendClientMessage(i, color, string[0]);
- }
- }
- new jour, mois, heure, minute, seconde, anne, str[190];
- new File:pos=fopen("LOG_AdminAlert.txt", io_append);
- gettime(heure, minute, seconde);
- getdate(anne, mois, jour);
- format(str,sizeof(str),"\r\n[%02i/%02i/%02i] %02i:%02i:%02i : %s", jour, mois, anne, heure, minute, seconde, string);
- fwrite(pos,str);
- fclose(pos);
- return 1;
- }
- stock aAlert(commande[], id) // when a player make a command
- {
- new str[200], count=0;
- if(PlayerInfo[id][pAdminlvl] > 0) // change
- {
- format(str, 200, "[AdminCmd] ADMIN %s (ID: %i) used the command %s", GetName(id), id, commande);
- }
- else //if(PlayerInfo[id][pAdminlvl] != 4) // change
- {
- format(str, 200, "[AdminCmd] %s (ID: %i) used the command : %s", GetName(id), id, commande);
- }
- if(strlen(str) == 0) return 1;
- foreach(new i : Player)
- {
- if(PlayerInfo[i][pAdminlvl] == 5 && count == 0) // change
- {
- SendClientMessage(i, X11_TAN, str);
- count ++;
- }
- break;
- }
- new jour, mois, heure, minute, seconde, anne, str3[300];
- new File:pos=fopen("LOG_AdminCmd.txt", io_append);
- gettime(heure, minute, seconde);
- getdate(anne, mois, jour);
- format(str3,sizeof(str3),"\r\n[ADMIN/CMD] [%02i/%02i/%02i] %02i:%02i:%02i | %s USED %s", jour, mois, anne, heure, minute, seconde, GetName(id), commande);
- fwrite(pos,str3);
- fclose(pos);
- return 1;
- }
- stock GetName(playerid)
- {
- new gName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, gName, sizeof(gName));
- return gName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement