HEy
Ist es eigentlich möglich das wenn ich Supporter Rank 1 bin das wenn er /ahelp macht auch nur die Befehle sieht?
Und das gleiche auch für Admin Rank 2 ? Bis 5 ?
HEy
Ist es eigentlich möglich das wenn ich Supporter Rank 1 bin das wenn er /ahelp macht auch nur die Befehle sieht?
Und das gleiche auch für Admin Rank 2 ? Bis 5 ?
Ja Klar siehe RGR
Ja ich such ihn kurz raus und test was da dazu gehört
if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAllowed] >= 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "*1* Azubi *** /w(isper) /ooc /kick /tv /recon /bigears /unfreeze /aond /aoffd /tgp");
SendClientMessage(playerid, COLOR_GRAD1, "*1* Azubi *** /aduty /free id /support Accept id /support Delete id /");
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "*1* Supporter Level 1 *** /w(isper) /ooc /kick /tv /recon /unfreeze /aond /aoffd");
SendClientMessage(playerid, COLOR_GRAD1, "*1* Supporter Level 1 *** /ooc /ip /a /checkwarns /check /setint /mute (/am)egaphone /ban /checkweapons");
SendClientMessage(playerid, COLOR_GRAD1, "*1* Supporter Level 1*** /kick /spawn /goto /a(dmin) /w(isper) /setplayerint /Donator");
SendClientMessage(playerid, COLOR_GRAD1, "*1* Supporter Level 1*** /givealllicenses /makeevent /gotoevent /eventaus /carcolor");
SendClientMessage(playerid, COLOR_GRAD1, "*1* Supporter Level 1*** /motoroffall /motoronall /knast /lic");
}
if (PlayerInfo[playerid][pAdmin] >= 2)
{
SendClientMessage(playerid, COLOR_GRAD2,"*2* Supporter Level 2 *** /clearchat /cnn /freeze /unfreeze /spawn /prison /respawnthiscar /prisoned");
SendClientMessage(playerid, COLOR_GRAD2,"*2* Supporter Level 2 *** /gethere /prison /unprison /setworld /cartoworld /cartoint /respawnzivi /respawnstadt /setworld /unbanip ");
}
if (PlayerInfo[playerid][pAdmin] >= 3)
{
SendClientMessage(playerid, COLOR_GRAD4,"*3* Supporter Level 3 *** /sethp /warn /gotocar /getcar /skydive (/i)nfo");
SendClientMessage(playerid, COLOR_GRAD4,"*3* Supporter Level 3 *** /eventcars /gotolist");
}
if (PlayerInfo[playerid][pAdmin] >= 4)
{
SendClientMessage(playerid, COLOR_GRAD4,"*4* Moderator Level 1 *** /nos(Nitro) /clearwarn /nosup /noa /noooc /fixveh /sethpall /bigears /setarmor /respawncars /setage /supervehslap /setgeworben");
}
if (PlayerInfo[playerid][pAdmin] >= 5)
{
SendClientMessage(playerid, COLOR_GRAD5,"*5* Moderator Level 2 *** /givepremium /startlotto /setarmor /sethp /noshowme /accban");
SendClientMessage(playerid, COLOR_GRAD5,"*5* Moderator Level 2 *** /givemats /givedrugs /setvhp /checklic");
}
if (PlayerInfo[playerid][pAdmin] >= 6)
{
SendClientMessage(playerid, COLOR_GRAD6,"*6* Administrator *** /weather /weatherall /fraksperre /fourdive /kb");
}
if (PlayerInfo[playerid][pAdmin] >= 7)
{
SendClientMessage(playerid, COLOR_GRAD6,"*7* Fraktions-/Leaderverwalter *** /setfkasse /house /houseo /biz /sbiz /setteam /edit /remarkzone ");
SendClientMessage(playerid, COLOR_GRAD6,"*7* Fraktions-/Leaderverwalter *** /makeleader /fl /makezivi /ainvite /auninvite /setteam ");
SendClientMessage(playerid, COLOR_GRAD6,"*7* Fraktions-/Leaderverwalter *** /setfamily ");
}
if (PlayerInfo[playerid][pAdmin] >= 9)
{
SendClientMessage(playerid, COLOR_GRAD6,"*9* KENT_BROCKMAN: /welcomeadmin /byeadmin /wannkick");
}
if (PlayerInfo[playerid][pAdmin] >= 10)
{
SendClientMessage(playerid, COLOR_GRAD6,"*10* /veh /fixcar");
}
if (PlayerInfo[playerid] [pAdmin] >= 2000)
{
SendClientMessage(playerid, COLOR_GRAD6,"*2000* [RGR] Projektleiter *** /asellbiz /asellhouse /asellsbiz /aselltanke /bigears /checkzinsen /kickallpd");
SendClientMessage(playerid, COLOR_GRAD6,"*2000* [RGR] Projektleiter *** /welcomeadmin /byeadmin /kb /setfkasse /giveDonator /sban /tsinfo /tsinfo2 ");
SendClientMessage(playerid, COLOR_GRAD6,"*2000* [RGR] Projektleiter *** /POND /efa /lfa /rafa");
}
}
return 1;
}
if(strcmp(cmdtext,"/ahelp",true)==0 || (strcmp(cmdtext,"/ah",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(!isPlayerAnAdmin(playerid,1))
{
SendClientMessage(playerid,ROT,"Adm 1: /kick | /goto | /gethere | /tv | /tvo | /slap | /veh");
}
if(!isPlayerAnAdmin(playerid,2))
{
SendClientMessage(playerid,ROT,"Adm 2: /ban | /wetter | /timeban | /tunban | /tban");
}
if(!isPlayerAnAdmin(playerid,3))
{
SendClientMessage(playerid,ROT,"Adm 3: /fist");
}
if(!isPlayerAnAdmin(playerid,4))
{
SendClientMessage(playerid,ROT,"Adm 4: Derzeit gibt es keine Admin Befehle für den Admin Rang");
}
if(!isPlayerAnAdmin(playerid,5))
{
SendClientMessage(playerid,ROT,"Adm 5: /setadmin | /takevip | /setvip");
}
return 1;
}
Was daran ist Falsch ? Krieg ständig nen Error
(582) : error 029: invalid expression, assumed zero
Klammer vor dem 2ten strcmp weg machen.
if(strcmp(cmdtext,"/ahelp",true)==0) || (strcmp(cmdtext,"/ah",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(!isPlayerAnAdmin(playerid,1))
{
SendClientMessage(playerid,ROT,"Adm 1: /kick | /goto | /gethere | /tv | /tvo | /slap | /veh");
}
if(!isPlayerAnAdmin(playerid,2))
{
SendClientMessage(playerid,ROT,"Adm 2: /ban | /wetter | /timeban | /tunban | /tban");
}
if(!isPlayerAnAdmin(playerid,3))
{
SendClientMessage(playerid,ROT,"Adm 3: /fist");
}
if(!isPlayerAnAdmin(playerid,4))
{
SendClientMessage(playerid,ROT,"Adm 4: Derzeit gibt es keine Admin Befehle für den Admin Rang");
}
if(!isPlayerAnAdmin(playerid,5))
{
SendClientMessage(playerid,ROT,"Adm 5: /setadmin | /takevip | /setvip");
}
return 1;
}
So sollte es gehen.
Geht nicht @Bartundlisa
Und wenn ich dann mein Script da einfüge und ich admin lvl 2 bin zeigt er mir 1 und 2 nicht an aber dafür 3 4 5
Du musst das auch an dein Adminsystem anpassen
Ja hab ich
if(strcmp(cmdtext,"/ahelp",true)==0 || strcmp(cmdtext,"/ah",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(!isPlayerAnAdmin(playerid,1))
{
SendClientMessage(playerid,ROT,"Adm 1: /kick | /goto | /gethere | /tv | /tvo | /slap | /veh");
}
if(!isPlayerAnAdmin(playerid,2))
{
SendClientMessage(playerid,ROT,"Adm 2: /ban | /wetter | /timeban | /tunban | /tban");
}
if(!isPlayerAnAdmin(playerid,3))
{
SendClientMessage(playerid,ROT,"Adm 3: /fist");
}
if(!isPlayerAnAdmin(playerid,4))
{
SendClientMessage(playerid,ROT,"Adm 4: Derzeit gibt es keine Admin Befehle für den Admin Rang");
}
if(!isPlayerAnAdmin(playerid,5))
{
SendClientMessage(playerid,ROT,"Adm 5: /setadmin | /takevip | /setvip");
}
}
return 1;
}
Normaler weise sollte er dir das dann auch so anzeigen^^
Die ! am beginn der Abfrage sollten raus, die machen doch wenig sinn
Fu** voll vergessen haha
da der ganze kak ja sonst verneint wird