PHP код:
new alabel[MAX_PLAYERS];
CMD:adminlabel(playerid, params[]) {
if(alabel[playerid] == 0)
{
if(!PlayerInfo[playerid][Level]) return SendClientMessage(playerid, red, "ERROR: You need to be admin to use this command");
if(PlayerInfo[playerid][Level] == 1)
{
Label[playerid] = Create3DTextLabel("Basic Moderator", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(PlayerInfo[playerid][Level] == 2)
{
Label[playerid] = Create3DTextLabel("Moderator", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(PlayerInfo[playerid][Level] == 3)
{
Label[playerid] = Create3DTextLabel("Master Moderator", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(PlayerInfo[playerid][Level] == 4)
{
Label[playerid] = Create3DTextLabel("Administrator", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(PlayerInfo[playerid][Level] == 5)
{
Label[playerid] = Create3DTextLabel("Master Admin", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(PlayerInfo[playerid][Level] == 6)
{
Label[playerid] = Create3DTextLabel("Elite Admin", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(PlayerInfo[playerid][Level] == 7)
{
Label[playerid] = Create3DTextLabel("General", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(PlayerInfo[playerid][Level] == 8)
{
Label[playerid] = Create3DTextLabel("Director", 0x00FF00FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
else if(IsPlayerAdmin(playerid))
{
Label[playerid] = Create3DTextLabel("RCON Admin", 0xFF0000FF, 0.0, 0.0, 0.0, 40.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);
SendClientMessage(playerid, blue, "Admin Label enabled!");
CMDMessageToAdmins(playerid, "ADMINLABEL");
alabel[playerid] = 1;
}
}
else
{
if(alabel[playerid] == 1)
{
Delete3DTextLabel(Text3D:Label[playerid]);
SendClientMessage(playerid, red, "Admin Label disabled!");
alabel[playerid] = 0;
}
}
return 1;
}