Guten Tag,
ich habe ein Problem wenn ich jemanden mit /setadmin Adminrang 1 Gebe steht in der /ahelp Admin-2. Aber wenn ich dann /setadmin 0 mache steht bei /ahelp Admin rang 1?
Why
Screen im Anhang.
Meine Ränge
Zeilen: static const admin_rang[][] = {"Probe Supporter","Supporter","Moderator","Administrator","Rcon-Administrator","Team-Leiter","CEO"};
Setadmin
ocmd:setadmin(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new pID, rank, msg[144];
if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,GELB,"/setadmin [spieler] [level] ");
if(rank<0||rank>7)return SendClientMessage(playerid,ROT,"Bitte gültigen Rang angeben.");
SetPVarInt(pID,"Adminlevel",rank);
SpielerSpeichern(pID);
format(msg, sizeof(msg),"%s hat dein Admin Level auf %i gesetzt.",SpielerName(playerid),GetPVarInt(pID,"Adminlevel"));
SendClientMessage(pID,BABYBLAU,msg);
format(msg, sizeof(msg),"Du hast erfolgreich das Adminlevel %i an %s gegeben.",GetPVarInt(pID,"Adminlevel"),pID);
SendClientMessage(playerid,GRÜN,msg);
return 1;
}
else
{
SendClientMessage(playerid,ROT,"Rang zu Niedrig.");
}
return 1;
}
/ahelp
ocmd:ahelp(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,GELB,"Admin-1: /spawn [Playerid],/kick [Playerid] [Grund]");
if(!isPlayerAnAdmin(playerid,2))return SendClientMessage(playerid,GELB,"Admin-2: /kill [Playerid],/clearchat,/tban [Playerid] [Zeit] [Grund]");
if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,GELB,"Admin-3: /ban [Playerid] [Grund]");
if(!isPlayerAnAdmin(playerid,4))return SendClientMessage(playerid,GELB,"Admin-4: /givemoney [Betrag], /giveallmoney [Betrag], /server [Nachricht]");
if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,GELB,"Admin-5: /v [Carid]");
if(!isPlayerAnAdmin(playerid,6))return SendClientMessage(playerid,GELB,"Admin-6: /makeadmin [Playerid] [Rang]");
if(!isPlayerAnAdmin(playerid,7))return SendClientMessage(playerid,GELB,"Admin-7: /spawn [Playerid],/kick [Playerid] [Grund]");
if(!isPlayerAnAdmin(playerid,7))return SendClientMessage(playerid,GELB,"Admin-7: /kill [Playerid],/clearchat,/tban [Playerid] [Zeit] [Grund]");
if(!isPlayerAnAdmin(playerid,7))return SendClientMessage(playerid,GELB,"Admin-7: /ban [Playerid] [Grund]");
if(!isPlayerAnAdmin(playerid,7))return SendClientMessage(playerid,GELB,"Admin-7: /givemoney [Betrag], /giveallmoney [Betrag], /server [Nachricht]");
if(!isPlayerAnAdmin(playerid,7))return SendClientMessage(playerid,GELB,"Admin-7: /v [Carid]");
if(!isPlayerAnAdmin(playerid,7))return SendClientMessage(playerid,GELB,"Admin-7: /makeadmin [Playerid] [Rang]");
return 1;
}