Beiträge von Goldkiller

    Hab zwar dcmd gewählt,ZCMD ist aber noch einfacher / besser ( ist relativ ) .
    strcmp -> dcmd -> zcmd


    Fischer,
    Da hast aber noch sscanf bei dcmd & strval strtok bei strcmp,was ein riesen Unterschied ist :p.
    Das kannst du so nicht direkt vergleiche,dennoch sind irgendwie die meisten dazu geneigt strcmp mit der bescheuerten strtok Variante zu nutzen.
    Die meisten die dcmd nutzen,wissen auch das es sscanf gibt um den Parameter Prozess noch zu vereinfachen.


    // Hier nochmal der Link zu ZCMD falls es wen interessiert: << Klick >>

    Du könntest auch mal genauer beschreiben was nicht funktioniert und anfangen mit Debug-Notes zu arbeiten.


    public wskill(playerid)
    {
    printf("wskill(%d) - Score: %d",playerid,GetPlayerScore(playerid));
    if(GetPlayerScore(playerid) <= 10 && GetPlayerScore(playerid) >= 10)
    {
    printf("Debug #1");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,50);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,50);
    }
    if(GetPlayerScore(playerid) >= 75)
    {
    printf("Debug #2");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);
    }
    if(GetPlayerScore(playerid) >= 150)
    {
    printf("Debug #3");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,250);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,250);
    }
    if(GetPlayerScore(playerid) >= 200)
    {
    printf("Debug #4");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,350);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,350);
    }
    if(GetPlayerScore(playerid) >= 300)
    {
    printf("Debug #5");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,450);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,450);
    }
    if(GetPlayerScore(playerid) >= 400)
    {
    printf("Debug #6");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,500);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,500);
    }
    if(GetPlayerScore(playerid) >= 500)
    {
    printf("Debug #7");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,600);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,600);
    }
    if(GetPlayerScore(playerid) >= 650)
    {
    printf("Debug #8");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,750);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,750);
    }
    if(GetPlayerScore(playerid) >= 750)
    {
    printf("Debug #9");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,850);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,850);
    }
    if(GetPlayerScore(playerid) >= 1000)
    {
    printf("Debug #10");
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,999);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,999);
    }
    return 1;
    }


    Weiss aber nicht,was du genau damit erreichen willst :
    if(GetPlayerScore(playerid) <= 10 && GetPlayerScore(playerid) >= 10)

    Das ist ja schon ein Widerspruch ( Würde nur funktionieren wenn Score 10 ist ) :huh:

    Angefangen hab ich mit Koordinaten sammeln für Car-Spawns,Pickups usw.
    Irgendwann dann mit simplen Commands wie /kill , /para , /airride.Hab aber anfangs nie verstanden wozu einige Sachen gut waren,hab dann irgendwann beschlossen nochmal bei null anzufangen.
    Dann kam so sinnloser Kram wo ich alleine nur +,-,*,/ usw ausprobiert habe oder ==, > , < , != , >= usw .
    Eins kam nach dem anderen bis Ich irgendwann da angekommen bin,wo Ich heute bin.

    for(new count;count<MAX_VEHICLES;count++){
    format(file, sizeof(file),"Fahrzeug_%d.prtfile",count);
    dini_Create(file);
    dini_IntSet(file,"%d",AutoDatei[playerid][id]);
    dini_FloatSet(file,"%d",AutoDatei[playerid][xx]);
    dini_FloatSet(file,"%d",AutoDatei[playerid][yy]);
    dini_FloatSet(file,"%d",AutoDatei[playerid][zz]);
    dini_FloatSet(file,"%d",AutoDatei[playerid][anglee]);
    CreateVehicle(ID, x, y, z, angle,-1,-1,-1);
    }}

    ...
    Schon mal auf die for() - Schleife geguckt?

    Hab ich doch tatsächlich vergessen Gestern hier noch zu posten.


    enum (<<= 1)
    {
    PLAYER_FLAG_GOD = 1,
    PLAYER_FLAG_VIP, // 2
    PLAYER_FLAG_MUTE, // 4
    PLAYER_FLAG_INVISIBLE, // 8
    PLAYER_FLAG_SPECTATED, // 16
    PLAYER_FLAG_SPEEDO, // ...
    PLAYER_FLAG_LOGGEDIN,
    PLAYER_FLAG_LOGINCHECK,
    PLAYER_FLAG_JAIL,
    PLAYER_FLAG_REGISTERMSG,
    PLAYER_FLAG_VTEXT,
    PLAYER_FLAG_DRAWAVAILABLE,
    PLAYER_FLAG_FREEZE,
    PLAYER_FLAG_LOGINPANEL
    };
    // defined um es einfacher zu gestalten :-O
    #define IsPlayerFlag(%0,%1) \
    (PlayerInfo[%0][ibFlag] & (%1) )


    #define AddPlayerFlag(%0,%1) \
    (PlayerInfo[%0][ibFlag] |= %1 )


    #define DeletePlayerFlag(%0,%1) \
    (PlayerInfo[%0][ibFlag] &= ~%1 )


    #define ResetPlayerFlag(%0) \
    (PlayerInfo[%0][ibFlag] = 0)
    // AddPlayerFlag(playerid,PLAYER_FLAG_MUTE); bsp


    Sowas kann man bei vielen Sachen benutzen.
    Ein gutes Beispiel wäre wohl ein Führerschein in einem Reallife-Script.
    Anstatt sowas zu benutzten:
    bool:HATAUTOFUEHRERSCHEIN[MAX_PLAYERS];
    bool:HATMOTORRADFUEHRERSCHEIN[MAX_PLAYERS];
    ...

    Kann man es anders regeln wie oben gezeigt.
    enum (<<= 1)
    {
    LAPPEN_AUTO = 1,
    LAPPEN_MOTORRAD,
    LAPPEN_BOOT,
    LAPPEN_FLUGZEUG
    };
    new ibFuehrerschein[MAX_PLAYERS];

    Man müsste dann nur Abfragen ob das Bit gesetzt ist für einen bestimmten Führerschein.
    if(ibFuehrerscehin[playerid] & LAPPEN_AUTO) { }
    Spart einiges an Arbeit.Hab es selber auch so gemacht in einem angefangen Reallife-Script :pinch: .


    Passt zwar nicht ganz hier in den Thread aber was solls :-O

    Ist relativ egal ob du nun eine von Rapidshare lädst oder direkt auf der autodesk Seite.
    Du brauchst so oder so einen Key um die Vollversion freizuschalten,bzw einen Keygenerator.

    Wovon redest du?
    Dein Satz macht nicht wirklich Sinn :-O!


    Zitat

    Wie kann ichn jetzt machen, dass wenn man das müllauto verlässt, die mission abbricht? :P


    Am besten bei OnPlayerExitVehicle( oder OnPlayerStateChange ) überprüfen ob er die Mission aktiv hatte und ob er im Müllwagen saß.