Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:adminchat(playerid, params[])
- {
- new mesaj[128], string[128];
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, "Nu esti admin.");
- if(sscanf(params, "s[128]", mesaj)) return SendClientMessage(playerid, COLOR_SYN, "Foloseste: /adminchat <mesaj>");
- {
- format(string, sizeof(string), "Admin %s[lv %d]: %s", GetName(playerid), PlayerInfo[playerid][pAdmin], mesaj);
- AdminChat(COLOR_AC, string, 1);
- }
- return 1;
- }
- function AdminChat(color, const string[], level) {
- new text[180];
- foreach(Player : i) {
- if(PlayerInfo[i][pAdmin] >= level) {
- format(text, 256, string);
- SCM(i, color, text);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment