Hey,
Wie kann ich bei /aduty Godmode einbauen?
Bisher sieht es so aus:
if (strcmp(cmd, "/adminduty", true) == 0 || strcmp(cmd, "/aduty", true) == 0)
{
if(AdminDuty[playerid] == 0)
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Mod[playerid] = Create3DTextLabel("Moderator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Moderator %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 2)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Mod[playerid] = Create3DTextLabel("Super Moderator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Super Moderator %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Supermod[playerid] = Create3DTextLabel("Administrator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Supermod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Administrator %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 1337)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("1337 Administrator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"1337 Adminstrator %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 1338)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("Fraktionsverwalter on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Fraktionsverwalter %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 1339)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("High-Adminstrator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"High-Adminstrator %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 2000)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("Server-Manager on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Server-Manager %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 2001)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("Projektleitung on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Projektleitung %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 2002)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("Projektleitung on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Projektleitung %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
else if(PlayerInfo[playerid][pSupporter] >= 1)
{
SetPlayerColor(playerid,0xFF0A00FF);
AdminDuty[playerid] = 1;
Supporter[playerid] = Create3DTextLabel("Supporter on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Supporter[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Supporter %s ist nun im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid,99999);
return 1;
}
}
if(AdminDuty[playerid] == 1)
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
format(string,sizeof(string),"Moderator %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
if(PlayerInfo[playerid][pAdmin] == 2)
{
format(string,sizeof(string),"Super Moderator %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
format(string,sizeof(string),"Administrator %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pAdmin] == 1337)
{
format(string,sizeof(string),"1337 Administrator %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pAdmin] == 1338)
{
format(string,sizeof(string),"Fraktionsverwalter %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pAdmin] == 1339)
{
format(string,sizeof(string),"High-Adminstrator %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pAdmin] == 2000)
{
format(string,sizeof(string),"Server-Manager %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pAdmin] == 2001)
{
format(string,sizeof(string),"Projektleitung %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pAdmin] == 2002)
{
format(string,sizeof(string),"Projektleitung %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
else if(PlayerInfo[playerid][pSupporter] <= 1)
{
format(string,sizeof(string),"Supporter %s ist nun nicht mehr im Dienst",sendername,playerid);
SendClientMessageToAll(0xFF0A00FF, string);
SetPlayerHealth(playerid, 100);
}
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
AdminDuty[playerid] = 0;
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, NAMECOLOR_LSCOP);
}
else
{
SetPlayerColor(playerid,TEAM_HIT_COLOR);
}
}
return 1;
}
return 1;
}
SetPlayerHealth(playerid, 999999); funktioniert nicht...