Ganz oben im Script new Aduty[MAX_PLAYERS];
ocmd:aduty(playerid,params[])
{
new string[128];
new off[128];
new Adminname[64];
switch(GetPVarInt(playerid,"Adminlevel"))
{
case 0:{Adminname="User";}
case 1:{Adminname="T-Sup";}
case 2:{Adminname="Supporter";}
case 3:{Adminname="Admin";}
case 4:{Adminname="T-HighAdmin";}
case 5:{Adminname="HighAdmin";}
case 1338:{Adminname="FullAdmin";}
case 1340:{Adminname="Serverleitung";}
}
if(Aduty[playerid] == 0)
{
if(!istPlayerAdmin(playerid,1))return SendClientMessage(playerid,drot,"**Du bist kein Administrator.");
format(string,sizeof(string),"**%s ist nun als %s im Dienst bei Fragen /sup.",PlayerName(playerid),Adminname);
SendClientMessageToAll(pinksupporter,string);
SetPlayerArmour(playerid,100);
Aduty[playerid] = 1;
}
else if(Aduty[playerid] == 1)
{
format(off,sizeof(off), "** %s ist nun nicht mehr im Admin Dienst!",PlayerName(playerid));
SendClientMessageToAll(pinksupporter,off);
SetPlayerArmour(playerid,0);
SetPlayerHealth(playerid,100);
Aduty[playerid] = 0;
}
return 1;
}
//edit: Wenn es falsch ist bitte melden. Ist ungetestet