13.03.2018, 20:56
Hello. I want my command to be shown like this.
AdminRank ServerName / ForumName (On Duty)
AdminRank ServerName / ForumName (Off Duty)
But instead, it shows like this.
AdminRank Servername AdminRank2 ServerName2 (without line break.)
And, I want to add a new command /forumname and to show if admin is adminduty.
Can you help me? Beside that, if no admin is online, it won't show the " Nici un admin online"
My command
ForumName command
aduty cmd
AdminRank ServerName / ForumName (On Duty)
AdminRank ServerName / ForumName (Off Duty)
But instead, it shows like this.
AdminRank Servername AdminRank2 ServerName2 (without line break.)
And, I want to add a new command /forumname and to show if admin is adminduty.
Can you help me? Beside that, if no admin is online, it won't show the " Nici un admin online"
My command
Code:
CMD:admins(playerid, params[]) { if(pInfo[playerid][pHour] >= 0) { new adminstring[128]; new text[128]; if(IsPlayerConnected(playerid)) { for (new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(pInfo[i][pAdminLevel] > 0) { format(adminstring, sizeof(adminstring),"%s%s %s\n / %s", adminstring, GetAdminName(i), PlayerName(i), ForumName(i)); format(text, sizeof(text),"Administratori Online"); } } } SendClientMessage(playerid,COLOR_WHITE, text); SendClientMessage(playerid,COLOR_GREEN, adminstring); } else return SendClientMessage(playerid,-1,"*"COL_LGREEN" Nici un admin online"); } return 1; }
ForumName command
Code:
CMD:forumname(playerid,params[]) { if(pInfo[playerid][pAdminLevel] >= 5) { new targetid,nume,string[180]; if(sscanf(params, "ud", targetid, nume)) return SendClientMessage(playerid,-1,""chat" /forumname [playerid] [nume]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online"); pInfo[targetid][ForumName] = nume; format(string, sizeof(string), "*"COL_RED" %s %s i-a setat numele de forum la %d lui %s",GetAdminName(playerid),PlayerName(playerid),nume,PlayerName(targetid)); SendMessageToAllAdmins(string, -1); } else { SendClientMessage(playerid,-1,"*"COL_RED" Nu esti autorizat sa folosesti comanda!"); } return 1; }
HTML Code:
CMD:aduty(playerid, params[]) { if (pInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid,COLOR_WHITE, "Nu esti Admin."); if (!pInfo[playerid][pAdminDuty]) { SetPlayerColor(playerid,COLOR_PURPLE); SetPlayerSkin(playerid,280); pInfo[playerid][pAdminDuty] = 1; new string[128]; GetPlayerName(playerid, string, 24); format(string, sizeof(string), "{FF0000} %s este acum Admin Duty. Foloseste (/report) pentru a cere ajutor" ,string); SendClientMessageToAll(-1, string); } else { SetPlayerColor(playerid, COLOR_WHITE); SetPlayerSkin(playerid,NORMAL); pInfo[playerid][pAdminDuty] = 0; new str[76], name[24]; GetPlayerName(playerid, name, 24); format(str, sizeof(str), "{FF0000}%s nu mai este Admin Duty", name); SendClientMessageToAll(COLOR_GREEN, str); } return 1; }