Code: Select all
new AdminDuty[MAX_PLAYERS];
new Text3D:label[MAX_PLAYERS];
В enum pInfo
Code: Select all
pAdminduty,
В комманды
Code: Select all
if(!strcmp(cmdtext, "/aduty", true))
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "С начало нужно войти");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
new PlayerName[30];
new str[256];
GetPlayerName(playerid, PlayerName, 30);
format(str, 256, "[ID:%d] %s выходит на админ-дежурство", playerid, PlayerName);
SetPlayerSkin(playerid,294);
SetPlayerColor(playerid, 0xF60000F6);
label[playerid] = Create3DTextLabel("Администратор на дежурстве\nНе стрелять!",0xFF0000FF,0,0,0,40,0,2);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.4);
GivePlayerWeapon(playerid, 31, 10001);
GivePlayerWeapon(playerid, 9, 1);
GivePlayerWeapon(playerid, 24, 10000);
SendClientMessageToAll(COLOR_RED, str);
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
new PlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
SendClientMessage(playerid, COLOR_YELLOW," Вы ушли с админ-дежурства.");
SetPlayerColor(playerid, 0xFFFFFFAA);
Delete3DTextLabel(label[playerid]);
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
GivePlayerWeapon(playerid, 1, 1);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Вы не Модератор");
return 1;
}
}
return 1;
}