Beiträge von Rastla

    Warum so kompliziert?


    Das ist von mir ein Gatescript.
    Also da ist auch noch viel anderes drin^^


    #include <a_samp>


    #pragma tabsize 4
    #define COLOR_YELLOW 0xFFFF00AA
    new y_gate[2];







    public OnFilterScriptInit()
    {
    y_gate[0] = CreateObject(989, -2652.3493652344, -220.3148651123, 5.0052194595337, 0.000000, 0.000000, 107.189453125); //object (ac_apgate) (1)
    y_gate[1] = CreateObject(989, -2657.8356933594, -220.36798095703, 4.9960298538208, 0.000000, 0.000000, 107.189453125); //object (ac_apgate) (2)


    print("\n--------------------------------------");
    print(" Gates Filterscript by Rastla");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/tropen", true) == 0)
    {


    MoveObject(y_gate[0],-2652.3493652344, -220.3148651123, 0.0000000000000,4);
    MoveObject(y_gate[1],-2657.8356933594, -220.36798095703, 0.0000000000000,4);
    SendClientMessage(playerid, COLOR_YELLOW,"Triaden-Tor, geöffnet!");


    }
    if (strcmp(cmdtext, "/trclose", true) == 0)
    {
    MoveObject(y_gate[0],-2652.3493652344, -220.3148651123, 5.0052194595337,4);
    MoveObject(y_gate[1],-2657.8356933594, -220.36798095703, 4.9960298538208,4);
    SendClientMessage(playerid, COLOR_YELLOW,"Triaden-Tor, geschlossen!");


    }
    //Triaden Base
    CreateObject(9482, -2655.2692871094, -220.52737426758, 9.8164644241333, 0.000000, 0.000000, 89.324493408203); //object (chinagate) (1)
    CreateObject(974, -2663.8679199219, -220.32955932617, 6.1189193725586, 0.000000, 0.000000, 0.000000); //object (tall_fence) (1)
    CreateObject(974, -2646.4118652344, -220.408203125, 6.1148948669434, 0.000000, 0.000000, 0.000000); //object (tall_fence) (2)
    CreateObject(974, -2669.1052246094, -220.25514221191, 6.1136779785156, 0.000000, 0.000000, 0.000000); //object (tall_fence) (3)
    CreateObject(974, -2673.419921875, -220.23937988281, 6.1136779785156, 0.000000, 0.000000, 0.000000); //object (tall_fence) (4)
    CreateObject(974, -2639.7258300781, -220.3683013916, 6.1125144958496, 0.000000, 0.000000, 0.000000); //object (tall_fence) (9)
    CreateObject(974, -2638.0595703125, -220.31436157227, 6.1136779785156, 0.000000, 0.000000, 0.000000); //object (tall_fence) (10)
    CreateObject(991, -2803.8825683594, -315.0325012207, 7.3953032493591, 0.000000, 0.000000, 85.3544921875); //object (bar_barriergate1) (1)
    CreateObject(991, -2804.4235839844, -321.68420410156, 7.3920860290527, 0.000000, 0.000000, 85.3544921875); //object (bar_barriergate1) (2)
    CreateObject(991, -2806.6252441406, -344.44293212891, 7.3973593711853, 0.000000, 0.000000, 85.3544921875); //object (bar_barriergate1) (3)
    CreateObject(991, -2806.1030273438, -337.80462646484, 7.3940634727478, 0.000000, 0.000000, 85.3544921875); //object (bar_barriergate1) (4)
    CreateObject(1552, -2805.408203125, -329.80545043945, 7.3278217315674, 0.000000, 0.000000, 83.369506835938); //object (vegasmashfnce) (1)
    CreateObject(1553, -2805.3703613281, -331.37451171875, 7.2251057624817, 0.000000, 0.000000, 85.3544921875); //object (vegasmashfnce_gate) (1)
    CreateObject(1553, -2805.1162109375, -328.3752746582, 7.232901096344, 0.000000, 0.000000, 85.3544921875); //object (vegasmashfnce_gate) (2)
    CreateObject(991, -2804.5798339844, -323.51028442383, 7.3949279785156, 0.000000, 0.000000, 85.3544921875); //object (bar_barriergate1) (5)
    CreateObject(991, -2805.9792480469, -336.18551635742, 7.3949279785156, 0.000000, 0.000000, 85.3544921875); //object (bar_barriergate1) (6)
    //Rifa Base
    CreateObject(2933, -2210.4733886719, 579.49816894531, 35.879676818848, 0.000000, 0.000000, 0.000000); //object (pol_comp_gate) (1) !!!OPENCLOSE
    CreateObject(2933, -2241.9877929688, 642.47528076172, 50.166194915771, 0.000000, 0.000000, 270.67565917969); //object (pol_comp_gate) (2) !!!OPENCLOSE
    CreateObject(2669, -2240.3757324219, 603.95654296875, 41.539840698242, 0.000000, 0.000000, 89.324493408203); //object (cj_chris_crate) (1)
    CreateObject(2669, -2240.3579101563, 606.89105224609, 41.525856018066, 0.000000, 0.000000, 89.324493408203); //object (cj_chris_crate) (2)
    CreateObject(7657, -2186.6086425781, 711.45861816406, 54.607467651367, 0.000000, 0.000000, 0.000000); //object (plasticsgate1) (1) !!!OPENCLOSE
    //LSPD
    CreateObject(7657, 1549.5622558594, -1627.5679931641, 14.099655151367, 0.000000, 0.000000, 270.67565917969); //object (plasticsgate1) (1) !!!OPENCLOSE
    CreateObject(980, 1588.359375, -1637.8903808594, 15.20213508606, 0.000000, 0.000000, 0.000000); //object (airportgate) (1) !!!OPENCLOSE
    CreateObject(3007, 1565.53125, -1633.7000732422, 13.277488708496, 0.000000, 0.000000, 0.000000); //object (chopcop_torso) (1)
    CreateObject(3008, 1565.5235595703, -1633.7131347656, 13.281542778015, 0.000000, 0.000000, 0.000000); //object (chopcop_armr) (1)
    CreateObject(3009, 1565.5172119141, -1633.7233886719, 13.285661697388, 0.000000, 0.000000, 0.000000); //object (chopcop_arml) (1)
    CreateObject(3010, 1565.3507080078, -1633.81640625, 13.297813415527, 0.000000, 0.000000, 0.000000); //object (chopcop_legr) (1)
    CreateObject(3011, 1565.7526855469, -1633.7703857422, 13.308539390564, 0.000000, 0.000000, 0.000000); //object (chopcop_legl) (1)
    CreateObject(3012, 1565.5523681641, -1633.6409912109, 13.21448802948, 0.000000, 0.000000, 0.000000); //object (chopcop_head) (1)
    CreateObject(3092, 1561.8975830078, -1637.1430664063, 15.298984527588, 0.000000, 0.000000, 0.000000); //object (dead_tied_cop) (1)
    CreateObject(3465, 1543.0031738281, -1602.9123535156, 13.698322296143, 0.000000, 0.000000, 89.324493408203); //object (vegspetrolpump) (1)
    CreateObject(3465, 1549.2629394531, -1603.0192871094, 13.698322296143, 0.000000, 0.000000, 91.309509277344); //object (vegspetrolpump) (2)




    return 0;
    }

    Hi!
    Habe ein Problem mit einem Teamcommand.
    Es kommt immer "Du bist kein Triade!" auch wenn man einer ist.


    Der Teamcommand ist folgender:


    if(strcmp(cmd, "/triadencmd", true) == 0)
    {
    if(gTeam[playerid] == TEAM_Triads)
    {
    SendPlayerFormattedText(playerid,"Glückwunsch! Du hast den Befehl: /triadencmd erfolgreich ausgeführt!.",COLOR_BLUE);
    }
    else
    {
    SendPlayerFormattedText(playerid,"Du bist kein Triade!",COLOR_RED);
    }
    return 1;
    }


    Die Teamdefines sind die:


    public OnPlayerRequestClass(playerid, classid)
    {
    iSpawnSet[playerid] = 0;
    SetupPlayerForClassSelection(playerid);
    if(classid == 126) //Triaden NUMERO 1
    {
    gTeam[playerid] = TEAM_Triads;
    }
    if(classid == 272) //Triaden NUMERO 2
    {
    gTeam[playerid] = TEAM_Triads;
    }
    if(classid == 98) //Triaden NUMERO 3
    {
    gTeam[playerid] = TEAM_Triads;
    }
    if(classid == 2) //wenn der Spieler den dritten Skin auswählt
    {
    gTeam[playerid] = TEAM_Vagos;
    }
    if(classid == 114) //Aztecas NUMERO 1
    {
    gTeam[playerid] = TEAM_Aztecas;
    }
    if(classid == 115) //Aztecas NUMERO 2
    {
    gTeam[playerid] = TEAM_Aztecas;
    }
    if(classid == 116) //Aztecas NUMERO 3
    {
    gTeam[playerid] = TEAM_Aztecas;
    }
    return 1;
    }



    Kann es daran liegen, dass der Server erst nach dem Befehl überprüft in welchen Team man ist?
    Weil die Überprüfung ist im Script an einer hinteren Stelle

    Da kann ich mir gut vorstellen dass die gesperrt sein könnte^^

    Achso, das musst du entweder in einen Gamemode oder in ein Fliterscript scripten und ausserdem SA-MP kompatibel machen.
    Das ist glaub ich MTA Map oder?^^ (Das kann helfen >-LINK-< )

    #include <a_samp>


    #pragma tabsize 4
    #define COLOR_YELLOW 0xFFFF00AA
    new y_gate[2];







    public OnFilterScriptInit()
    {
    y_gate[0] = CreateObject(989, -2652.3493652344, -220.3148651123, 5.0052194595337, 0.000000, 0.000000, 107.189453125); //object (ac_apgate) (1)
    y_gate[1] = CreateObject(989, -2657.8356933594, -220.36798095703, 4.9960298538208, 0.000000, 0.000000, 107.189453125); //object (ac_apgate) (2)


    print("\n--------------------------------------");
    print(" Gates Filterscript by Rastla");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/tropen", true) == 0)
    {


    MoveObject(y_gate[0],-2652.3493652344, -220.3148651123, 0.0000000000000,4);
    MoveObject(y_gate[1],-2657.8356933594, -220.36798095703, 0.0000000000000,4);
    SendClientMessage(playerid, COLOR_YELLOW,"Triaden-Tor, geöffnet!");


    }
    if (strcmp(cmdtext, "/trclose", true) == 0)
    {
    MoveObject(y_gate[0],-2652.3493652344, -220.3148651123, 5.0052194595337,4);
    MoveObject(y_gate[1],-2657.8356933594, -220.36798095703, 4.9960298538208,4);
    SendClientMessage(playerid, COLOR_YELLOW,"Triaden-Tor, geschlossen!");


    }


    return 0;
    }


    Hier ein Beispiel von mir. Vielleicht kannst du damit was anfangen.

    ähm...^^


    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(308) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(308) : error 017: undefined symbol "classid"
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(310) : error 017: undefined symbol "classid"
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(314) : error 017: undefined symbol "classid"
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(318) : error 017: undefined symbol "classid"
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(322) : error 017: undefined symbol "classid"
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(326) : error 017: undefined symbol "classid"
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(347) : warning 225: unreachable code
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    7 Errors.

    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(310) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas ORIGINAL\SA-MP 0.3a\gamemodes\lvdm.pwn(349) : warning 225: unreachable code
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.

    new gTeam[MAX_PLAYERS];


    #define TEAM_Aztecas 0
    #define TEAM_Triads 1
    #define TEAM_Vagos 2


    new classid;



    //public OnPlayerRequestClass(playerid, classid);
    {
    if(classid == 114) //Aztecas NUMERO 1
    {
    gTeam[playerid] = TEAM_Aztecas;
    }
    if(classid == 115) //Aztecas NUMERO 2
    {
    gTeam[playerid] = TEAM_Aztecas;
    }
    if(classid == 116) //Aztecas NUMERO 3
    {
    gTeam[playerid] = TEAM_Aztecas;
    }
    if(classid == 1) //wenn der Spieler den zweiten Skin auswählt
    {
    gTeam[playerid] = TEAM_Triads;
    }
    if(classid == 2) //wenn der Spieler den dritten Skin auswählt
    {
    gTeam[playerid] = TEAM_Vagos;
    }
    return 1;
    }


    Fehlermeldung: Es ist eine Warning wo was steht mit unreachable Code. Dort steht dass das dort wo der Script weiter geht ist... Ich glaube ihr wisst was ihr meint.



    HaH(Hoffe auf Hilfe),
    Firefox

    Ich kapier das nicht


    Float:x und Float:y, mit denen wird doch wie bei einem Rechteck der Punkt A und Punkt B angegeben. Floag:z ist dann noch die Höhe. D.h. jetzt ist es ein Quader. Aber was ist hier der Radius?

    Hi!
    Ich habe in Problem, und zwar möchte ich gerne wissen, wie man scriptet, dass wenn ein spieler da und da ist, aber NUR von dieser Höhe bis zu dieser Höhe



    IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)

    Was ist da die Höhe?