Tore mir Radius

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
  • Kann mir einer das schnell fertig Scripten das man das tor nur zu/auf bekommt wenn man ca 3 Meter davorsteht?? und vllt Makieren was geändert wurde damit ich weiß wie es geht xD



    #include <a_samp>
    new beispiel_Gate;
    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT


    #if defined FILTERSCRIPT


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()
    {
    print("\n----------------------------------");
    print(" Kartbahn von Bart");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    beispiel_Gate = CreateObject(980, 1245.454712, -766.847351, 93.887329, 0.0000, 0.0000, 0.0000);
    // Don't use these lines if it's a filterscript
    SetGameModeText("Kartbahn von Bart");
    AddPlayerClass(115, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    CreateObject(7304, 1099.024170, 1271.167358, 12.708544, 0.0000, 0.0000, 180.0000);
    CreateObject(8292, 1176.105713, 1262.228760, 13.225658, 0.0000, 0.0000, 146.2501);
    CreateObject(982, 1137.196289, 1345.667358, 10.503867, 0.0000, 0.0000, 270.0000);
    CreateObject(983, 1149.950073, 1342.482910, 10.503867, 0.0000, 0.0000, 0.0000);
    CreateObject(982, 1162.777954, 1339.279541, 10.496072, 0.0000, 0.0000, 270.0000);




    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerPrivmsg(playerid, recieverid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {


    if (strcmp(cmdtext, "/open", true) == 0)
    if (isPlayertoPoint(7,1245.454712, -766.847351, 93.887329,4)}
    {
    MoveObject(beispiel_Gate,1245.477783, -766.830872, 99.441406,4);


    return 1;
    }
    if (strcmp(cmdtext, "/close", true) == 0){
    MoveObject(beispiel_Gate, 1245.454712, -766.847351, 93.887329,4);


    return 1;
    }
    return 0;
    }
    public OnPlayerInfoChange(playerid)
    {
    return 1;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }

    Mit freundlichen Grüssen Bart :rolleyes:

  • Deine fassung
    if (isPlayertoPoint(7,1245.454712, -766.847351, 93.887329,4)}


    Neue Fassung
    if (isPlayertoPoint(3,1245.454712, -766.847351, 93.887329,4)} // musst die7 meter radius durch 3 erstetzen

  • Deine fassung
    if (isPlayertoPoint(7,1245.454712, -766.847351, 93.887329,4)}


    Neue Fassung
    if (isPlayertoPoint(3,1245.454712, -766.847351, 93.887329,4)} // musst die7 meter radius durch 3 erstetzen


    wenn man keine ahnung hat einfach mal die fresse halten

    if (PlayertoPoint(3, playerid, 1245.454712, -766.847351, 93.887329,4))


    public 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;
    }

  • xD geil danke but würdest du das noch ganz einfügen? also das ich das Script so übernehmen kann? :?: :?: :?:


    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(37) : warning 217: loose indentation
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(40) : warning 217: loose indentation
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(292) : warning 217: loose indentation
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(357) : error 017: undefined symbol "PlayertoPoint"
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(357) : error 029: invalid expression, assumed zero
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(358) : warning 217: loose indentation
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(363) : warning 225: unreachable code
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(363) : warning 217: loose indentation
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(366) : warning 217: loose indentation
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(368) : warning 217: loose indentation
    C:\Users\Matteo2\Saved Games\GTA San Andreas\server\gamemodes\123.pwn(440) : warning 235: public function lacks forward declaration (symbol "PlayerToPoint")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    jetzt kommt das heraus

    Mit freundlichen Grüssen Bart :rolleyes:

    Einmal editiert, zuletzt von Bart ()