Brauche Hilfe !!!

In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums
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 bin grade dabei ein zollsystem zu machen, habe auch alles sogut wie fertig aber ich bekomme es nicht hin das sich die schranke nach 5 sec schließen soll.


    Kann mir jemand helfen hier ist mein PWN


    #include <a_samp>
    #pragma tabsize 0
    #pragma tabsize 0
    new Tor;
    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");
    Tor= CreateObject(968, 60.202377, -1529.952881, 4.788054, 0.0000, 270.6186, 263.9066);
    return 1;
    }
    public OnFilterScriptExit()
    {
    return 1;
    }



    public OnPlayerCommandText(playerid, cmdtext[]) {
    if (strcmp(cmdtext, "/auf", 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(Tor,0.0000,0.0000, 263.9066);


    }
    return 1;
    }


    if (strcmp(cmdtext, "/zu", true)==0)
    {
    if(PlayerToPoint(5.0, playerid, 64.2256,-1527.3058,4.8064)) // zoll eins
    {
    SetObjectRot(Tor,0.0000,270.6186, 263.9066);


    }
    return 1;
    }
    return 0;
    }




    Danke jetzt schon mal

  • #include <a_samp>
    #pragma tabsize 0
    #pragma tabsize 0


    forward close();


    new Tor;


    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");
    Tor= CreateObject(968, 60.202377, -1529.952881, 4.788054, 0.0000, 270.6186, 263.9066);
    return 1;
    }
    public OnFilterScriptExit()
    {
    return 1;
    }



    public close()
    {
    SetObjectRot(Tor,0.0000,270.6186, 263.9066);
    }



    public OnPlayerCommandText(playerid, cmdtext[]) {
    if (strcmp(cmdtext, "/auf", 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(Tor,0.0000,0.0000, 263.9066);
    SetTimer("close",5000,0);
    }
    return 1;
    }
    return 0;
    }


    So dürfte das Funktionieren!


    LG Piedro aka. Bene

  • Danke shön ch habe noch ne frage wen ih ein zweites tor machen will wie mus ich dan die daten eingeben mus ich alles doppelt machen z.b.


    forward close();


    noch mal machen??


    kannst du mir eben helfen.


    du kannst ja die daten nehmen die ich scon drine habe nur um mir zu zeigen wie ich zei tore mchen kann.

  • wenn man neue Öffentliche Klassen erstellt (public)
    müssen diese einmal mit forward deklariert werden


    forward myclass();
    public myclass()
    {



    }


    und das bei jeder neuen klasse forward klassenname(params);

    Mfg. BlackFoX_UD_ alias [BFX]Explosion


  • Wie meinst du das??


    ich habe mal hier ein zwete schranke


    Tor= CreateObject(968, 59.532272, -1535.599731, 4.911957, 0.0000, 89.3814, 263.9840); 

    public OnPlayerCommandText(playerid, cmdtext[]) {
    if (strcmp(cmdtext, "/auf", 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(Tor,0.0000,359.1406, 263.9840);


    }
    return 1;
    }


    if (strcmp(cmdtext, "/zu", true)==0)
    {
    if(PlayerToPoint(5.0, playerid, 64.2256,-1527.3058,4.8064)) // zoll eins
    {
    SetObjectRot(Tor,0.0000,89.3814, 263.9840);


    }
    return 1;
    }


    wie bekomme ich das auch dazu am besten wen es wenig platz odr wen es übesichtlich bleibet ich habe noch 34 schranken vor mir undic will die alle in einen filterscript reinpacken ohne das man die überblich verliet.
    MFG ShowTime