ocmd Groß-/Kleinschreibung

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
  • Vorab:
    Ich habe mehrfach gegooglet, mir zich includes von ocmd runterladen, sscanf unten im GM gehabt und als include, und ingame kann ich es einfach nicht groß schreiben.


    Habe die OCMD.inc 2.0.0

    Zitat

    OCMD 2.0.0

    sscanf hab ich ebenfalls als include(v 1.1)


    Und ingame kann ich einfach nicht /kIcK schreiben oder so.

  • /*---------------------------------------


    /--------\ /--------\ /\
    | | | | / \
    | | | | / \ |-----
    | | |--------/ / \ |
    | | | |--------| \----\
    | | | | | |
    \--------/ | | | -----/


    OBJECTSTREAMER & MAPEDITOR
    VERSION 5.1.1
    OCMD MODULE


    ---------------------------------------*/


    /*
    OCMD 2.0.0
    by kleinerOpa
    best command-solution for sa:mp
    supports samp 0.2X, 0.3a without OCMD_CHECK_UPDATE function
    supports samp 0.3b, 0.3c
    WEB: www.kleiner-opa.de
    ICQ: 611064955
    */


    #include <a_samp>
    #if defined OCMD_CHECK_UPDATE
    #tryinclude <a_http>
    #if !defined HTTP
    #error OCMD_CHECK_UPDATE only works with a_http.inc
    #undef OCMD_CHECK_UPDATE
    #endif
    #endif


    forward ocmdOnPlayerCommandText(playerid,cmdtext[]);
    #if defined OCMD_BEFORE_CALLBACK
    forward BeforePlayerCommandText(playerid,cmdtext[]);
    #endif
    #if defined OCMD_CHECK_UPDATE
    forward ocmdCheckUpdate();
    forward ocmdCheckUpdate2(index,response_code,data[]);
    #endif


    #if defined OCMD_BEFORE_CALLBACK
    new bool:ocmdBeforeCallback;
    #endif
    #if defined OCMD_BEFORE_CALLBACK || defined OCMD_CHECK_UPDATE
    new bool:ocmdInit;
    #endif


    #define ocmd:%1(%2) forward ocmd_%1(%2);\
    public ocmd_%1(%2)


    #define OCMD_VERSION "2.0.0"


    public OnPlayerCommandText(playerid,cmdtext[])
    {
    #if defined OCMD_BEFORE_CALLBACK || defined OCMD_CHECK_UPDATE
    if(!ocmdInit)
    {
    #if defined OCMD_BEFORE_CALLBACK
    if(funcidx("BeforePlayerCommandText")!=-1)ocmdBeforeCallback=true;
    #endif
    #if defined OCMD_CHECK_UPDATE
    SetTimer("ocmdCheckUpdate",(60*1000),false);
    SetTimer("ocmdCheckUpdate",(60*60*1000),true);
    #endif
    ocmdInit=true;
    }
    #endif
    new ocmdStr[32]="ocmd_",
    i=1,
    #if defined OCMD_COMMAND_LOG
    ocmdName[MAX_PLAYER_NAME],
    #endif
    bool:ocmdNoParams;
    #if defined OCMD_COMMAND_LOG
    GetPlayerName(playerid,ocmdName,sizeof ocmdName);
    printf("[cmd] [%s]: %s",ocmdName,cmdtext);
    #endif
    #if defined OCMD_BEFORE_CALLBACK
    if(ocmdBeforeCallback&&!CallLocalFunction("BeforePlayerCommandText","ds",playerid,cmdtext))return 1;
    #endif
    for(;i<128;i++)
    {
    if(!cmdtext[i]||cmdtext[i]==' ')
    {
    if(!cmdtext[i]||!cmdtext[i+1])ocmdNoParams=true;
    break;
    }
    ocmdStr[i+4]=tolower(cmdtext[i]);
    }
    if(!ocmdNoParams&&CallLocalFunction(ocmdStr,"ds",playerid,cmdtext[i+1]))return 1;
    if(ocmdNoParams&&CallLocalFunction(ocmdStr,"ds",playerid," "))return 1;
    return CallLocalFunction("ocmdOnPlayerCommandText","ds",playerid,cmdtext);
    }


    #if defined OCMD_CHECK_UPDATE
    public ocmdCheckUpdate()
    {
    HTTP(1,HTTP_GET,"www.kleiner-opa.de/sc/ocmd.txt","","ocmdCheckUpdate2");
    }
    public ocmdCheckUpdate2(index,response_code,data[])
    {
    if(strlen(data)&&strcmp(OCMD_VERSION,data)!=0)
    {
    new ocmdStr[128];
    format(ocmdStr,sizeof ocmdStr,"An update for OCMD is available (version %s) - www.kleiner-opa.de",data);
    print(ocmdStr);
    for(new i;i<MAX_PLAYERS;i++)if(IsPlayerAdmin(i))SendClientMessage(i,0xD3D3FFFF,ocmdStr);
    }
    }
    #endif


    #define OnPlayerCommandText ocmdOnPlayerCommandText
    Fügt das einfach in eurem ocmd Include ein (also lösch das Vom Include und füg das stat dessen ein).
    Tony__Young Download Link Funkt nicht ^^

    [tabmenu][tab=Ziele]100 Beiträge[x]
    150 Beiträge[x]
    200 Beiträge[x]
    250 Beiträge[x]
    300 Beiträge[x]
    350 Beiträge[x]
    400 Beiträge[x]
    450 Beiträge[x]
    500 Beiträge[ ]

  • Aktuellste:/*
    OCMD 2.0.1
    by Kleiner Opa
    best command-solution for sa:mp
    supports samp 0.2X, 0.3a, 0.3b, 0.3c, 0.3d, 0.3e
    email: fisch70000@gmail.com
    http://forum.sa-mp.de/index.php?page=User&userID=24998
    */


    #include <a_samp>


    forward ocmdOnPlayerCommandText(playerid,cmdtext[]);
    #if defined OCMD_BEFORE_CALLBACK
    forward BeforePlayerCommandText(playerid,cmdtext[]);
    new bool:ocmdBeforeCallback,bool:ocmdInit;
    #endif


    #define ocmd:%1(%2) forward ocmd_%1(%2);\
    public ocmd_%1(%2)


    public OnPlayerCommandText(playerid,cmdtext[])
    {
    #if defined OCMD_BEFORE_CALLBACK
    if(!ocmdInit)
    {
    if(funcidx("BeforePlayerCommandText")!=-1)ocmdBeforeCallback=true;
    ocmdInit=true;
    }
    #endif
    new ocmdStr[32]="ocmd_",
    i=1,
    #if defined OCMD_COMMAND_LOG
    ocmdName[MAX_PLAYER_NAME],
    #endif
    bool:ocmdNoParams;
    #if defined OCMD_COMMAND_LOG
    GetPlayerName(playerid,ocmdName,sizeof ocmdName);
    printf("[cmd] [%s]: %s",ocmdName,cmdtext);
    #endif
    #if defined OCMD_BEFORE_CALLBACK
    if(ocmdBeforeCallback&&!CallLocalFunction("BeforePlayerCommandText","ds",playerid,cmdtext))return 1;
    #endif
    for(;i<128;i++)
    {
    if(!cmdtext[i]||cmdtext[i]==' ')
    {
    if(!cmdtext[i]||!cmdtext[i+1])ocmdNoParams=true;
    break;
    }
    ocmdStr[i+4]=tolower(cmdtext[i]);
    }
    if(!ocmdNoParams&&CallLocalFunction(ocmdStr,"ds",playerid,cmdtext[i+1]))return 1;
    if(ocmdNoParams&&CallLocalFunction(ocmdStr,"ds",playerid," "))return 1;
    return CallLocalFunction("ocmdOnPlayerCommandText","ds",playerid,cmdtext);
    }


    #define OnPlayerCommandText ocmdOnPlayerCommandText