Guten tag Leute,
ich habe einen befehl erstellt undzwar /ahelp aber irgendwie kommt nichts...
kommt kein Error nichts und ingame wenn ich /ahelp eintippe komtm nichts auch kein UNKNOWN:Server...
Befehl:
ocmd:ahelp (playerid,params[])
{
if(!isPlayerAnAdmin(playerid,1))SendClientMessage(playerid,ROT,"*______Admin-Befehle______*
if(!isPlayerAnAdmin(playerid,7))SendClientMessage(playerid,ROT,"Momentan keine");
if(!isPlayerAnAdmin(playerid,6))SendClientMessage(playerid,ROT,"/makeleader /setadmin /restart");
if(!isPlayerAnAdmin(playerid,5))SendClientMessage(playerid,ROT,"Momentan keine");
if(!isPlayerAnAdmin(playerid,4))SendClientMessage(playerid,ROT,"Momentan Keine");
if(!isPlayerAnAdmin(playerid,3))SendClientMessage(playerid,ROT,"/gethere /goto /ban /bsn");
if(!isPlayerAnAdmin(playerid,2))SendClientMessage(playerid,ROT,"/kick ");
if(!isPlayerAnAdmin(playerid,1))SendClientMessage(playerid,ROT,"/a ");
return 1;
}
/ahelp geht nicht
- xsL33p.[137]
- Geschlossen
- Erledigt
-
-
ocmd:ahelp (playerid,params[])
{
if(isPlayerAnAdmin(playerid,1))
{
SendClientMessage(playerid,ROT,"*______Admin-Befehle______*");
SendClientMessage(playerid,ROT,"/a ");
}
if(isPlayerAnAdmin(playerid,2))
{
SendClientMessage(playerid,ROT,"/kick ");
}
if(isPlayerAnAdmin(playerid,3))
{
SendClientMessage(playerid,ROT,"/gethere /goto /ban /bsn");
}
if(isPlayerAnAdmin(playerid,4))
{
SendClientMessage(playerid,ROT,"Momentan Keine");
}
if(isPlayerAnAdmin(playerid,5))
{
SendClientMessage(playerid,ROT,"Momentan Keine");
}
if(isPlayerAnAdmin(playerid,6))
{
SendClientMessage(playerid,ROT,"/makeleader /setadmin /restart");
}
if(isPlayerAnAdmin(playerid,7))
{
SendClientMessage(playerid,ROT,"Momentan Keine");
}
return 1;
}warum ! = ??
-
wenn du kein Admin bist wird es wahrscheinlich angezeigt, obwohl eigentlich beim ersten if ja eine ) fehlt.....
-
@ Andre_R so würde er nur anzeigen die Befehle nur für das Level sind... ich denke mal das du aber das so haben willst das der Admin level 2 auch die Level 1 Befehle sieht
ocmd:ahelp (playerid,params[])
{
if(isPlayerAnAdmin(playerid,>=0))
{
SendClientMessage(playerid,ROT,"*______Admin-Befehle______*");
SendClientMessage(playerid,ROT,"/a ");
}
if(isPlayerAnAdmin(playerid,>=1))
{
SendClientMessage(playerid,ROT,"/kick ");
}
if(isPlayerAnAdmin(playerid,>=4))
{
SendClientMessage(playerid,ROT,"/gethere /goto /ban /bsn");
}
if(isPlayerAnAdmin(playerid,>=)5)
{
SendClientMessage(playerid,ROT,"Momentan Keine");
}
if(isPlayerAnAdmin(playerid,>=6))
{
SendClientMessage(playerid,ROT,"Momentan Keine");
}
if(isPlayerAnAdmin(playerid,>=7))
{
SendClientMessage(playerid,ROT,"/makeleader /setadmin /restart");
}
if(isPlayerAnAdmin(playerid,>=8))
{
SendClientMessage(playerid,ROT,"Momentan Keine");
}
return 1;
} -
isPlayerAnAdmin ist aber so definiert:
stock isPlayerAnAdmin(playerid,rang)
{
if(GetPVarInt(playerid,"Adminlevel")>=rang)return 1;
return 0;
}da er es denke ich per MrMonat gemacht hat
-
Mach so
stock isPlayerAnAdmin(playerid,rang)
{
if(GetPVarInt(playerid,"Adminlevel")>=rang)return 1;
return 0;
}
und
stock isPlayerNotAnAdmin(playerid,rang)
{
if(getPVarInt(playerid,"Adminlevel")<=rang)
return 0;
}Dann einfach 2 mal in einem Befehl mit beiden stocks arbeiten
/EDIT!!
-
Guten tag Leute,
ich habe einen befehl erstellt undzwar /ahelp aber irgendwie kommt nichts...
kommt kein Error nichts und ingame wenn ich /ahelp eintippe komtm nichts auch kein UNKNOWN:Server...
Befehl:
ocmd:ahelp (playerid,params[])
{
if(!isPlayerAnAdmin(playerid,1))SendClientMessage(playerid,ROT,"*______Admin-Befehle______*
if(!isPlayerAnAdmin(playerid,7))SendClientMessage(playerid,ROT,"Momentan keine");
if(!isPlayerAnAdmin(playerid,6))SendClientMessage(playerid,ROT,"/makeleader /setadmin /restart");
if(!isPlayerAnAdmin(playerid,5))SendClientMessage(playerid,ROT,"Momentan keine");
if(!isPlayerAnAdmin(playerid,4))SendClientMessage(playerid,ROT,"Momentan Keine");
if(!isPlayerAnAdmin(playerid,3))SendClientMessage(playerid,ROT,"/gethere /goto /ban /bsn");
if(!isPlayerAnAdmin(playerid,2))SendClientMessage(playerid,ROT,"/kick ");
if(!isPlayerAnAdmin(playerid,1))SendClientMessage(playerid,ROT,"/a ");
return 1;
}
Kann so nicht gehen ...
Eher so:
ocmd:ahelp (playerid,params[])
{
if(!isPlayerAnAdmin(playerid,>=1))SendClientMessage(playerid,ROT,"*______Admin-Befehle______*");
if(!isPlayerAnAdmin(playerid,>=7))SendClientMessage(playerid,ROT,"Momentan keine");
if(!isPlayerAnAdmin(playerid,>=6))SendClientMessage(playerid,ROT,"/makeleader /setadmin /restart");
if(!isPlayerAnAdmin(playerid,>=5))SendClientMessage(playerid,ROT,"Momentan keine");
if(!isPlayerAnAdmin(playerid,>=4))SendClientMessage(playerid,ROT,"Momentan Keine");
if(!isPlayerAnAdmin(playerid,>=3))SendClientMessage(playerid,ROT,"/gethere /goto /ban /bsn");
if(!isPlayerAnAdmin(playerid,>=2))SendClientMessage(playerid,ROT,"/kick ");
if(!isPlayerAnAdmin(playerid,>=1))SendClientMessage(playerid,ROT,"/a ");
return 1;
} -
breadfish.de
Hat das Thema geschlossen.