Ahelp wird falsch dagegeben

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Und zwar folgendes Problem,
    wenn ich Adminrank 5 auf dem Server bin und /ahelp eingebe, dann kommt nur der Text für Adminrank 1, das passiert auch mit anderen Ranks, es wird immer nur der Adminrank 1 dargestellt.
    An was liegt das?




    if(strcmp("/ah", cmd, true) == 0 || strcmp("/ahelp", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] != 0)
    {
    SendClientMessage(playerid, COLOR_WHITE,"__________________________• Adminstratoren Befehle:__________________________");
    if(PlayerInfo[playerid][pAdmin] == -1)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FFFFFF}» Beschwerde-Mod: /prison /warn /check /clearchat /a /atake /po /tban /prison");
    }
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /tv(off) /afk /unten /oben /fly /check /checkakte /checktime /checklicenses");
    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /ooc /do /togwhisper /togphone /gotos /slap /atutorial /aond /kick /ah /supportticketsystemhelp /acabuse");
    }
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{EBFF00}» Rang 2(Moderator):{FFFFFF} /mute /unmute /resetderbycars /cnn /countdown /skydive /checkwarns /(un)freeze cops /checkweapons /leaders /resetderbycars /tban");
    }
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{00BCFF}» Rang 3(Super Moderator):{FFFFFF} /clearchat /arace /ammukegel /cnnn /checkticket /(un)prison /atake /atow /atowcarid /showplace /objectsyshelp /eventport");
    SendClientMessage(playerid, COLOR_WHITE,"{00BCFF}» Rang 3(Super Moderator):{FFFFFF} /addobject /objects /destroyobject /destroyallobjects /pspawn /anos /acolorcar /handkante /flip /skick /tune /ban");
    }
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /gsspawn /setgs /resetupdates /resettickets /jetpack /allowchangename /czoll /info /zollcontrol /noooc /adminchat");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /asellbiz /asellhouse /aselltanke /asellsbiz /house /biz /tankenbiz /sbiz /filltanken /edit /mole /startlotto");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /setstat /fourdive /auninvite /makeleader /gotocoords /enterplayer /entercar /gotohouse /gotozoll /mark /gotomark");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /agivelicense /getcar /fuelcars /respawnallcars /detroyalladminobjects /attachobjecttovehicle /setplayerattachedobject");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /givegun /sethp /setarmor /setvehicle /setskin /forcename /wegcar /veh /spawnstaticvehicle /acars /fixveh /burncar");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /respawn /destroycar /respawnlspd /linkvehtoint /wetter /setmoney /takemoney /warn /clearwarn /entban /entbanip");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /cheater /ipban /kickall /invitesperre /paydayinmyrange /startbonus /maske /atazer /wanted /clear /showhaus");
    }
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{AF00FF}» Rang 5(Projektleiter):{FFFFFF} /getallgangcars /saveall /saveserver /spawnhealth /setint /setvirtualworld /getvirtualworld /makeadmin /updatetexte");
    SendClientMessage(playerid, COLOR_WHITE,"{AF00FF}» Rang 5(Projektleiter):{FFFFFF} /givecoints /spawnnpc /givedonator /restart /paydayall /clearserverstats /seetax /cleartax /eventkasse /givetax /npcs");
    SendClientMessage(playerid, COLOR_WHITE,"{AF00FF}» Rang 5(Projektleiter):{FFFFFF} /paydayinmyrange /paydayall /gfabbrechen /contractall /cleargfpausetime /allowchangename /respawnallcars");
    }
    SendClientMessage(playerid, COLOR_WHITE,"_____________________________________________________________________________");
    }
    }
    return 1;
    }

  • Mach überall == 1 oder 2 oder 3 oder 4 oder 5 usw.


    Und dann einfach bei == 4 alle nachrichten von 1,2,3,4 reinschreiben.
    if(PlayerInfo[playerid][pAdmin] == 4)
    {

    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /tv(off) /afk /unten /oben /fly /check /checkakte /checktime /checklicenses");
    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /ooc /do /togwhisper /togphone /gotos /slap /atutorial /aond /kick /ah /supportticketsystemhelp /acabuse");
    SendClientMessage(playerid, COLOR_WHITE,"{EBFF00}» Rang 2(Moderator):{FFFFFF} /mute /unmute /resetderbycars /cnn /countdown /skydive /checkwarns /(un)freeze cops /checkweapons /leaders /resetderbycars /tban");
    SendClientMessage(playerid, COLOR_WHITE,"{00BCFF}» Rang 3(Super Moderator):{FFFFFF} /clearchat /arace /ammukegel /cnnn /checkticket /(un)prison /atake /atow /atowcarid /showplace /objectsyshelp /eventport");
    SendClientMessage(playerid, COLOR_WHITE,"{00BCFF}» Rang 3(Super Moderator):{FFFFFF} /addobject /objects /destroyobject /destroyallobjects /pspawn /anos /acolorcar /handkante /flip /skick /tune /ban");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /gsspawn /setgs /resetupdates /resettickets /jetpack /allowchangename /czoll /info /zollcontrol /noooc /adminchat");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /asellbiz /asellhouse /aselltanke /asellsbiz /house /biz /tankenbiz /sbiz /filltanken /edit /mole /startlotto");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /setstat /fourdive /auninvite /makeleader /gotocoords /enterplayer /entercar /gotohouse /gotozoll /mark /gotomark");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /agivelicense /getcar /fuelcars /respawnallcars /detroyalladminobjects /attachobjecttovehicle /setplayerattachedobject");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /givegun /sethp /setarmor /setvehicle /setskin /forcename /wegcar /veh /spawnstaticvehicle /acars /fixveh /burncar");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /respawn /destroycar /respawnlspd /linkvehtoint /wetter /setmoney /takemoney /warn /clearwarn /entban /entbanip");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /cheater /ipban /kickall /invitesperre /paydayinmyrange /startbonus /maske /atazer /wanted /clear /showhaus");
    }

  • Mach überall == 1 oder 2 oder 3 oder 4 oder 5 usw.


    Und dann einfach bei == 4 alle nachrichten von 1,2,3,4 reinschreiben.




    Wie unnötig ist das denn?? =D
    Er hat schon den richtigen Ansatz gemacht....Er sendet je höher man ist mehr Nachrichten.
    Das Problem hatte ich auch mal....
    Versuchs mal mit einer extra Funktion Sprich:


    if(strcmp("/ah", cmd, true) == 0 || strcmp("/ahelp", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    ShowAdminHelp(playerid);
    }
    }
    return 1;
    }



    Function ShowAdminHelp(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /tv(off) /afk /unten /oben /fly /check /checkakte /checktime /checklicenses");
    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /ooc /do /togwhisper /togphone /gotos /slap /atutorial /aond /kick /ah /supportticketsystemhelp /acabuse");
    }
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{EBFF00}» Rang 2(Moderator):{FFFFFF} /mute /unmute /resetderbycars /cnn /countdown /skydive /checkwarns /(un)freeze cops /checkweapons /leaders /resetderbycars /tban");
    }
    }
    }


    L.G.
    heyho ;)

    Einmal editiert, zuletzt von heyhooo ()

  • Wollte euch kurz was zeigen:


    Das ist das alte wo es noch ging:


    if(strcmp("/ah", cmd, true) == 0 || strcmp("/ahelp", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] != 0)
    {
    SendClientMessage(playerid, COLOR_BLUE,"__________ Adminstratoren-Commands __________");
    if(PlayerInfo[playerid][pAdmin] == -1)
    {
    SendClientMessage(playerid, COLOR_GREEN,"Beschwerde-Mod: /prison /warn /check /clearchat /a /atake /po /tban /prison");
    }
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    SendClientMessage(playerid, COLOR_GREEN,"Rang 1(Supporter): /aond /kick /goto /clearchat /oben /unten /fly /ooc (/p)layer(o)oc /tv /cnn /supportticketsystemhelp");
    SendClientMessage(playerid, COLOR_GREEN,"Rang 1(Supporter): /setint /setvirtualworld /getvirtualworld /slap clearchat /mute /afk /acabuse(Chat abuse)");
    SendClientMessage(playerid, COLOR_GREEN,"Rang 1(Supporter): /check /checklicenses /resetderbycars /togadminchat /pspawn /updatetexte ");
    }
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
    SendClientMessage(playerid, COLOR_GREEN,"Rang 2(Supporter): /bigears /skydive /showplace /gotos /atutorial /ban /tban /ipban /prison /checkwarns /freeze /unfreeze /gotoprison");
    SendClientMessage(playerid, COLOR_GREEN,"Rang 2(Supporter): /respawnallcars");
    }
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
    SendClientMessage(playerid, COLOR_GREEN,"Rang 3(Admin): /atow /atowcarid /entercar /gethere /gotocar /mark /gotomark /objectsyshelp /unprison");
    }
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
    SendClientMessage(playerid, COLOR_GREEN,"Rang 4(High-Admin): /fourdive /warn /gotocoords /getcar /destroycar /sethp /setarmor /anos /acolorcar /respawncar /linkvehtoint");
    SendClientMessage(playerid, COLOR_GREEN,"Rang 4(High-Admin): /Leadermake /auninvite /Invitesperre /startlotto /mole /wetter /givemoney /editpayday /gotozoll /setmoney /setvehicleheal /forcename");
    SendClientMessage(playerid, COLOR_GREEN,"Rang 4(High-Admin): /burncar /setname /attachobjecttovehicle /setplayerattachedobject /entban /entbanip /veh");
    SendClientMessage(playerid, COLOR_GREEN,"Rang 4(High-Admin): /countdown /noooc /fuelcars /setskin /flip /gotohouse /atake /fixveh /veh /wegcar(Destroyen) /acars /agivelicense");



    }
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
    SendClientMessage(playerid, COLOR_GREEN,"Rang 5(Projektleitung): /givecoints /makeadmin /saveall /saveserver /givedonator /aselltanke /asellbiz /asellsbiz /asellhouse /edit /takemoney");
    SendClientMessage(playerid, COLOR_GREEN,"Rang 5(Projektleitung): /setstat /adminchat /enterplayer /cnnn /house /biz /sbiz /tankenbiz /restart");
    }
    }
    }
    return 1;


    Dann hab ich es schöner gemacht mit Farben etc
    ab da ging dann nur noch Supporterbefehle
    if(strcmp("/ah", cmd, true) == 0 || strcmp("/ahelp", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] != 0)
    {
    SendClientMessage(playerid, COLOR_HELPGREY,"|_________________________________________| {FFFFFF}Adminstratoren Befehle{99999B} |_________________________________________|");
    if(PlayerInfo[playerid][pAdmin] == -1)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FFFFFF}» Beschwerde-Mod: /prison /warn /check /clearchat /a /atake /po /tban /prison");
    }
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /tv(off) /afk /unten /oben /fly /check /checkakte /checktime /checklicenses");
    SendClientMessage(playerid, COLOR_WHITE,"{FF9500}» Rang 1(Supporter):{FFFFFF} /ooc /do /togwhisper /togphone /gotos /slap /atutorial /aond /kick /ah /supportticketsystemhelp /acabuse");
    }
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{EBFF00}» Rang 2(Moderator):{FFFFFF} /mute /unmute /resetderbycars /cnn /countdown /skydive /checkwarns /(un)freeze cops /checkweapons /leaders /resetderbycars /tban");
    }
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{00BCFF}» Rang 3(Super Moderator):{FFFFFF} /clearchat /arace /ammukegel /cnnn /checkticket /(un)prison /atake /atow /atowcarid /showplace /objectsyshelp /eventport");
    SendClientMessage(playerid, COLOR_WHITE,"{00BCFF}» Rang 3(Super Moderator):{FFFFFF} /addobject /objects /destroyobject /destroyallobjects /pspawn /anos /acolorcar /handkante /flip /skick /tune /ban");
    }
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /gsspawn /setgs /resetupdates /resettickets /jetpack /allowchangename /czoll /info /zollcontrol /noooc /adminchat");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /asellbiz /asellhouse /aselltanke /asellsbiz /house /biz /tankenbiz /sbiz /filltanken /edit /mole /startlotto");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /setstat /fourdive /auninvite /makeleader /gotocoords /enterplayer /entercar /gotohouse /gotozoll /mark /gotomark");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /agivelicense /getcar /fuelcars /respawnallcars /detroyalladminobjects /attachobjecttovehicle /setplayerattachedobject");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /givegun /sethp /setarmor /setvehicle /setskin /forcename /wegcar /veh /spawnstaticvehicle /acars /fixveh /burncar");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /respawn /destroycar /respawnlspd /linkvehtoint /wetter /setmoney /takemoney /warn /clearwarn /entban /entbanip");
    SendClientMessage(playerid, COLOR_WHITE,"{FF0000}» Rang 4(Administrator):{FFFFFF} /cheater /ipban /kickall /invitesperre /paydayinmyrange /startbonus /maske /atazer /wanted /clear /showhaus");
    }
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{AF00FF}» Rang 5(Projektleiter):{FFFFFF} /getallgangcars /saveall /saveserver /spawnhealth /setint /setvirtualworld /getvirtualworld /makeadmin /updatetexte");
    SendClientMessage(playerid, COLOR_WHITE,"{AF00FF}» Rang 5(Projektleiter):{FFFFFF} /givecoints /spawnnpc /givedonator /restart /paydayall /clearserverstats /seetax /cleartax /eventkasse /givetax /npcs");
    SendClientMessage(playerid, COLOR_WHITE,"{AF00FF}» Rang 5(Projektleiter):{FFFFFF} /paydayinmyrange /paydayall /gfabbrechen /contractall /cleargfpausetime /allowchangename /respawnallcars");
    }
    SendClientMessage(playerid, COLOR_HELPGREY,"|____________________________________________________________________________________________________________|");
    }
    }
    return 1;


  • ;)