!! Hilfe !!

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
  • Hallo ich brauche schnell hilfe damit ich mein projekt fertig werden kan.


    unswa ich habe vor ein zollsystem zu bauen, aber ich konte eine schranke so scripten das man geldbezahlen mus und das die schranke nach 5 sec zu geht aber wie ka ich merere schranken dazu bauen die unabhängig funktionieren. z.b. ein zoll mit 2 schranken eine für spieler die rausfahren aus ls und eine für leute dei in ls reinfahrne wollen beide müssen beim zoll geld bezahlen.


    Mein problem ist ich bekomme es nicht hin mehrere schranken in einer filtersript einzubauen die unabhängig funtzen.


    Hier bin ich stehen geblieben ich denke mal das alles falsch ist. kann mir jemand zeigen wie das besser geht??


    #include <a_samp>
    #pragma tabsize 0
    #pragma tabsize 0
    forward closea();
    forward closeb();
    new Tora;
    new Torb;
    stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }
    public OnFilterScriptInit()
    {

    print("\n--------------------------------------");
    print(" pdgerage Filterscript by BoNeS");
    print("--------------------------------------\n");
    Tora= CreateObject(968, 60.202377, -1529.952881, 4.788054, 0.0000, 270.6186, 263.9066);
    Torb= CreateObject(968, 59.532272, -1535.599731, 4.911957, 0.0000, 89.3814, 263.9840);
    return 1;
    }
    public OnFilterScriptExit()
    {
    return 1;
    }
    public closea()
    {
    SetObjectRot(Tora,0.0000,270.6186, 263.9066);

    }
    public closeb()
    {
    SetObjectRot(Torb,0.0000,89.3814, 263.9840);
    }
    public OnPlayerCommandText(playerid, cmdtext[]) {
    if (strcmp(cmdtext, "/zoll", true)==0)
    {
    if(PlayerToPoint(5.0, playerid, 64.2256,-1527.3058,4.8064))// zoll eins
    {
    GivePlayerMoney(playerid,-200);
    GameTextForPlayer(playerid, "~r~ Zoll bezahlt. ~b~ Gute Fahrt", 5000, 1);
    SetObjectRot(Tora,0.0000,0.0000, 263.9066);
    SetTimer("closea",5000,0);
    }
    return 1;
    }


    if (strcmp(cmdtext, "/zoll", true)==0)
    {
    if(PlayerToPoint(5.0, playerid, 54.8526,-1539.0751,5.0116))// zoll eins
    {
    GivePlayerMoney(playerid,-200);
    GameTextForPlayer(playerid, "~r~ Zoll bezahlt. ~b~ Gute Fahrt", 5000, 1);
    SetObjectRot(Torb,0.0000,359.1406, 263.9840);
    SetTimer("closeb",5000,0);
    }
    return 1;
    }
    return 0;
    }