15.10.2016, 08:59
Hello, As you know, I would like to share my /admins command to all players ! Cause, i found a lot of players that they need any clear /admins commands in full english ! So, if you want, Here IT IS! Hope you enjoy, And Stay awesome!
We need ONLY one stuff.
ZCMD:
For ZCMD : https://sampforum.blast.hk/showthread.php?tid=91354
First, we need the enums to define them for the /admins command...
Done!
Now, let's go to /admins.
We need to put the defines before doing it.
Put the CMD
Then, if you want to put pragma like #pragma unused params if you want. I will add it
__________________________________________________ _________________________________
After it, Put
Now, let's define them with news.
Let's send a message.
So, let's countinue...
Put the ||| for(new i = 0; i < MAX_PLAYERS; i++)
{ |||
Then, put the if(IsPlayerConnected for all players to show it, and the next of the word....
After it, put the level. But dont change the PlayerInfo[playerid][Hide]. Let it to 0 to be showed to all players.
After it, Put the RCON rank Like this.
Below from it, Put the AdmRank. You can put the (RCON Administrator to your level, Everything you want.)
After it, Put the levels like this.
Now, Let's use the levels. Switching levels.
Now, Let's START TO ADD THE LEVELS ! You can place any cases you need. I will put 8 cases (Levels).
Now let's put the Duties. You can put 2+ cases for the duties. I added only 2
The best it is to add how it will be seeing to players the duties.
Now, if there is no any admin online in the list, Put it like this BELOW !
You can change these colours if you want
And Let's put the last thing we need.
That's it!
__________________________________________________ ______________________________________
For full, Copy this !
Thanks!
+REP ME If i helped you !
We need ONLY one stuff.
ZCMD:
For ZCMD : https://sampforum.blast.hk/showthread.php?tid=91354
First, we need the enums to define them for the /admins command...
Code:
enum pInfo { Level, Hide, OnDuty, }; new PlayerInfo[MAX_PLAYERS][pInfo];
Now, let's go to /admins.
We need to put the defines before doing it.
Put the CMD
Code:
CMD:admins(playerid,params[]) {
__________________________________________________ _________________________________
After it, Put
Code:
#pragma unused params
Code:
new count = 0; new string[128]; new AdmRank[128]; new AdmDuty[128]; new ChangeColor;
Code:
SendClientMessage(playerid, COLOR_LIMEGREEN, " "); SendClientMessage(playerid, COLOR_LIMEGREEN, "{5EFF00}___________ |- Online Admins -| ___________"); SendClientMessage(playerid, COLOR_LIMEGREEN, " ");
Put the ||| for(new i = 0; i < MAX_PLAYERS; i++)
{ |||
Code:
for(new i = 0; i < MAX_PLAYERS; i++) {
Code:
if (IsPlayerConnected(i)) {
Code:
if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0) {
Code:
if(IsPlayerAdmin(i)) {
Code:
AdmRank = "RCON Administrator"; ChangeColor = red;
Code:
} else {
Code:
switch(PlayerInfo[i][Level]) {
Code:
case 1: { AdmRank = "Trial Moderator"; ChangeColor = COLOR_ORANGE; } case 2: { AdmRank = "Junior Moderator"; ChangeColor = COLOR_GREEN; } case 3: { AdmRank = "Super Moderator"; ChangeColor = COLOR_YELLOW; } case 4: { AdmRank = "Administrator"; ChangeColor = COLOR_LIMEGREEN; } case 5: { AdmRank = "Supreme Administrator"; ChangeColor = COLOR_WHITE; } case 6: { AdmRank = "Expert Administrator"; ChangeColor = COLOR_ROYALBLUE; } case 7: { AdmRank = "Delta Administrator"; ChangeColor = red; } case 8: { AdmRank = "Alfa Administrator"; ChangeColor = red; } } }
Code:
switch(PlayerInfo[i][OnDuty]) { case 0: AdmDuty = "Off Duty!"; case 1: AdmDuty = "On Duty!"; }
Code:
if(PlayerInfo[i][OnDuty] == 0 || PlayerInfo[i][OnDuty] == 2) { format(string, 128, "Level: %d - %s (Id:%i) | %s | {FF0000}%s",PlayerInfo[i][Level], GetName(i),i,AdmRank,AdmDuty); SendClientMessage(playerid, ChangeColor, string); count++; } if(PlayerInfo[i][OnDuty] == 1) { format(string, 128, "Level: %d - %s (Id:%i) | %s | {5EFF00}%s",PlayerInfo[i][Level], GetName(i),i,AdmRank,AdmDuty); SendClientMessage(playerid, ChangeColor, string); count++; } } } }
You can change these colours if you want
Code:
if (count == 0) SendClientMessage(playerid,red,"No admin online in the list"); SendClientMessage(playerid, COLOR_LIMEGREEN, "{5EFF00}________________________________________"); SendClientMessage(playerid, red, " "); return 1; }
Code:
stock GetName(playerid) { new name[24]; GetPlayerName(playerid, name, 24); return name; }
__________________________________________________ ______________________________________
For full, Copy this !
Code:
CMD:admins(playerid,params[]) { #pragma unused params new count = 0; new string[128]; new AdmRank[128]; new AdmDuty[128]; new ChangeColor; SendClientMessage(playerid, COLOR_LIMEGREEN, " "); SendClientMessage(playerid, COLOR_LIMEGREEN, "{5EFF00}___________ |- Online Admins -| ___________"); SendClientMessage(playerid, COLOR_LIMEGREEN, " "); for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0) { if(IsPlayerAdmin(i)) { AdmRank = "RCON Administrator"; ChangeColor = red; } else { switch(PlayerInfo[i][Level]) { case 1: { AdmRank = "Trial Moderator"; ChangeColor = COLOR_ORANGE; } case 2: { AdmRank = "Junior Moderator"; ChangeColor = COLOR_GREEN; } case 3: { AdmRank = "Super Moderator"; ChangeColor = COLOR_YELLOW; } case 4: { AdmRank = "Administrator"; ChangeColor = COLOR_LIMEGREEN; } case 5: { AdmRank = "Supreme Administrator"; ChangeColor = COLOR_WHITE; } case 6: { AdmRank = "Expert Administrator"; ChangeColor = COLOR_ROYALBLUE; } case 7: { AdmRank = "Delta Administrator"; ChangeColor = red; } case 8: { AdmRank = "Alfa Administrator"; ChangeColor = red; } } } switch(PlayerInfo[i][OnDuty]) { case 0: AdmDuty = "Off Duty!"; case 1: AdmDuty = "On Duty!"; case 2: AdmDuty = "AFK!"; } if(PlayerInfo[i][OnDuty] == 0 || PlayerInfo[i][OnDuty] == 2) { format(string, 128, "Level: %d - %s (Id:%i) | %s | {FF0000}%s",PlayerInfo[i][Level], GetName(i),i,AdmRank,AdmDuty); SendClientMessage(playerid, ChangeColor, string); count++; } if(PlayerInfo[i][OnDuty] == 1) { format(string, 128, "Level: %d - %s (Id:%i) | %s | {5EFF00}%s",PlayerInfo[i][Level], GetName(i),i,AdmRank,AdmDuty); SendClientMessage(playerid, ChangeColor, string); count++; } } } } if (count == 0) SendClientMessage(playerid,red,"No admin online in the list"); SendClientMessage(playerid, COLOR_LIMEGREEN, "{5EFF00}________________________________________"); SendClientMessage(playerid, red, " "); return 1; } stock GetName(playerid) { new name[24]; GetPlayerName(playerid, name, 24); return name; }
+REP ME If i helped you !