problem commands wo ist der fehler ?

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
  • hi ich hab heute neue commands in meinen neuen gm eingefügt aber öhm die gehn iwie nicht im server nicht mal die fehler meldung unbekanter command wird angezeigt die admin scirpt commands gehn auch nicht aber wenn ich den alten gm laufen lasse geht das adm scripü wieder


    das hir sind die commands


    public OnPlayerCommandText(playerid, cmdtext[])
    {


    if(strcmp(cmdtext, "/panzer") == 0) {
    SetPlayerArmour(playerid, 100);
    SendClientMessage(playerid, COLOR_RED, "Nun trägst du eine Schutzweste.");
    return 1;
    }


    if(strcmp(cmdtext, "/medi") == 0) {
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid, COLOR_RED, "Deine Energie wurde aufgeladen.");
    return 1;


    }



    if(strcmp(cmdtext, "/help") == 0) {
    GameTextForPlayer(playerid,"~r~/jumps ~w~/teleports ~y~/dms",7000,5);
    SendClientMessage(playerid, COLOR_RED, "andere Commands");
    SendClientMessage(playerid, 0xFFFF00AA, "/givecash /medi /panzer /kill /afk /back /flip");
    return 1;
    }


    if(strcmp(cmdtext, "/commands") == 0) {
    GameTextForPlayer(playerid,"~r~/jumps ~w~/teleports ~y~/dms",7000,5);
    SendClientMessage(playerid, COLOR_RED, "andere Commands");
    SendClientMessage(playerid, 0xFFFF00AA, "/givecash /medi /panzer /kill /afk /back /flip/para");
    return 1;
    }



    if(strcmp(cmdtext, "/kill") == 0) {
    SetPlayerHealth(playerid, 0);


    return 1;


    }


    if(strcmp(cmdtext, "/tuning", true) == 0)
    {


    SendClientMessage(playerid,0xFF9900AA, "benutze: /drift [1-3]");


    return 1;
    }


    if(strcmp(cmdtext, "/drift 1", true) == 0)
    {


    new name[MAX_PLAYER_NAME];
    new string[100];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s ist bei /drfit 1", name);
    SendClientMessageToAll(0x0EA2DFF, string);
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
    SetVehiclePos(GetPlayerVehicleID(playerid), -2404.6809, -580.1221, 132.7315);
    }
    else
    {
    SetPlayerPos(playerid, -2404.6809, -580.1221, 132.7315);
    }


    return 1;
    }



    if(strcmp(cmdtext, "/drift 2", true) == 0)
    {


    new name[MAX_PLAYER_NAME];
    new string[100];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s ist bei /drfit 2", name);
    SendClientMessageToAll(0x0EA2DFF, string);
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
    SetVehiclePos(GetPlayerVehicleID(playerid), -329.6230, 1515.2321, 75.3594);
    }
    else
    {
    SetPlayerPos(playerid, -329.6230, 1515.2321, 75.3594);
    }


    return 1;
    }


    if(strcmp(cmdtext, "/drift 3", true) == 0)
    {


    new name[MAX_PLAYER_NAME];
    new string[100];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s ist bei /drfit 3", name);
    SendClientMessageToAll(0x0EA2DFF, string);
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
    SetVehiclePos(GetPlayerVehicleID(playerid), 2320.6704, 1385.9901, 44.5026);
    }
    else
    {
    SetPlayerPos(playerid, 2320.6704, 1385.9901, 44.5026);
    }


    return 1;
    }


    if(strcmp(cmdtext, "/jumps") == 0) {
    GameTextForPlayer(playerid, "~r~/tj /skroad ~w~ /bigjump /tower /dj /dj2 /rushmor",10000,1);
    GameTextForPlayer(playerid, "~r~/apj /big ramp /hj /sos /sos2 /tramp /ej /ej2",10000,1);
    return 1;
    }


    if(strcmp(cmdtext, "/teleports") == 0) {
    GameTextForPlayer(playerid, "~r~ /chilliad /sfp /at-400 /tuning [1-3] /drift [1-3]/skate /ls /sf /lv ",10000,1);
    return 1;
    }


    if(strcmp(cmdtext, "/dms") == 0) {
    GameTextForPlayer(playerid, "~r~/dm [1-2]~y~/armydm ~y~/war",10000,1);
    return 1;
    }


    if(strcmp(cmdtext, "/dm", true) == 0)
    {


    SendClientMessage(playerid,0xFF9900AA, "benutze: /dm [1-2]");


    return 1;
    }


    if(strcmp(cmdtext, "/dm 1", true) == 0)
    {


    SetPlayerPos(playerid, -1404.8365,1486.7024,7.1016);
    GivePlayerWeapon(playerid, 30, 8000);
    GivePlayerWeapon(playerid, 27, 8000);
    return 1;
    }


    if(strcmp(cmdtext, "/dm 2", true) == 0)
    {


    SetPlayerPos(playerid, -1485.2217,307.2930,53.4609);
    GivePlayerWeapon(playerid, 30, 8000);
    GivePlayerWeapon(playerid, 27, 8000);
    return 1;
    }


    if(strcmp(cmdtext,"/afk",true) == 0)
    {
    TogglePlayerControllable(playerid,0);
    new name[24],string[128];
    GetPlayerName(playerid,name,sizeof name);
    format(string,sizeof string,"**%s ist nun AFK**",name);
    SendClientMessageToAll(MSG,string);
    return 1;
    }
    if(strcmp(cmdtext,"/back",true) == 0)
    {


    TogglePlayerControllable(playerid,1);
    new name[24],string[128];
    GetPlayerName(playerid,name,sizeof name);
    format(string,sizeof string,"**%s ist nun wieder da**",name);
    SendClientMessageToAll(MSG,string);
    return 1;


    }


    if(strcmp(cmdtext, "/nos", true) == 0)
    {


    if(!IsPlayerInAnyVehicle(playerid))
    {
    SendClientMessage(playerid,0xE0F1E4FF,"SERVER: du braucht ein Auto.");
    return 1;
    }
    new playervehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));
    if(playervehiclemodel == 581 || playervehiclemodel == 523 || playervehiclemodel == 462 || playervehiclemodel == 521 || playervehiclemodel == 463 || playervehiclemodel == 522 || playervehiclemodel == 461 || playervehiclemodel == 448 || playervehiclemodel == 468 || playervehiclemodel == 586 || playervehiclemodel == 509 || playervehiclemodel == 481 || playervehiclemodel == 510)
    {
    SendClientMessage(playerid,0xE0F1E4FF,"SERVER:Nos geht nicht auf einem Bike");
    return 1;
    }
    new string[256];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"NITRO EINGESPRIZT ");
    SendClientMessage(playerid,0xE0F1E4FF,string);
    AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
    return 1;
    }


    if(strcmp(cmdtext, "/para", true) == 0)
    {
    GivePlayerWeapon(playerid, 46, 1);
    return 1;
    }




    SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command. gib /help für die commands ein."); return 1;
    }
    also ich bekomme keine warnings oder errors alles perfeckt nur im server läuft nix :( ich habe jetzt nicht die ganze commands liste gepostet aber die sind eigentlich alle so ich hoffe jemand findet den fehler :)