new alabel[MAX_PLAYERS];
CMD:adminlabel(playerid, params[]) {
if(alabel[playerid] == 0)
{
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;
}
} else return SendClientMessage(playerid, red, "ERROR: You need to be admin to use this command");
return 1;
}
D:\SA-MP Servers\NZTDM\Gamemodes\NZTDM-1.pwn(36305) : error 029: invalid expression, assumed zero D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(36305) : warning 215: expression has no effect D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(36305) : error 001: expected token: ";", but found "return" D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(36306) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
} else return SendClientMessage(playerid, red, "ERROR: You need to be admin to use this command"); return 1; |
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;
}
PHP код:
|