Was bewirkt SetPDistance

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
  • There is no page titled ":SetPDistance". You can create this page.


    MY SELFMADE GAMEMODE "NoName"

    Inhalt anzeigen


    - AccountSystem: 100%
    - LizenzenSystem: 5%
    - TelefonSystem: 5%
    - JobSystem: 3%
    - GeldSystem: 80%
    - AutoSystem: 75%
    - FahndungsSystem: [color=#ff6600]10%
    [color=#000000]- HausSystem: [color=#ff0000]0%

    [color=#000000]- GeschäftsSystem: [color=#ff0000]0%

    [color=#000000]- ZahlTag System: [color=#ff0000]0%

    [color=#000000]- WetterSystem: [color=#ff0000]0%

    [color=#000000]- AntiCheatSystem: [color=#ff0000]0%

    Inhalt anzeigen

    Inhalt anzeigen
    GameModeName: [GM]MyGamemode
    Filterscripts: None
    Benutze Includes: [Inc]MyInclude
    Voraussichtliche Fertigstellung: Unbekannt
    Voraussichtliche Servereröffnung: Unbekannt
    Voraussichtliche Veröffentlichung des Scripts: Wahrscheinlich NIE
    Voraussichtliche Veröffentlichung des Scripts: Wahrscheinlich NIE
    Sonstige Anmerkungen: Selfmade

  • Sie ist in dem Include "morphinc.inc" enthalten.


    Hier die Include:

    Inhalt anzeigen
    new pdistance = 1;

    Inhalt anzeigen

    Inhalt anzeigen
    forward NameTimer();

    Inhalt anzeigen

    Inhalt anzeigen
    Float:GetPointDistanceToPointExMorph(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2)
    {
    new Float:x, Float:y, Float:z;
    x = x1-x2;
    y = y1-y2;
    z = z1-z2;
    return floatsqroot(x*x+y*y+z*z);
    }
    stock SetPDistance(dista)
    {
    pdistance = dista;
    }
    stock GetPDistance()
    {
    return pdistance;
    }
    stock EnableDistancedNameTag(delay)
    {
    SetTimer("NameTimer",delay,1);
    }

    Inhalt anzeigen

    Inhalt anzeigen
    forward NameTimer();
    public NameTimer()
    {
    for(new i = 0;i < MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    for(new q = 0;q < MAX_PLAYERS;q++)
    {
    if(IsPlayerConnected(q))
    {
    new Float:p1x;
    new Float:p1y;
    new Float:p1z;
    new Float:p2x;
    new Float:p2y;
    new Float:p2z;
    if(IsPlayerConnected(i) && IsPlayerConnected(q))
    {
    GetPlayerPos(i,p1x,p1y,p1z);
    GetPlayerPos(q,p2x,p2y,p2z);
    if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)
    {
    ShowPlayerNameTagForPlayer(i,q,1);
    }
    else
    {
    ShowPlayerNameTagForPlayer(i,q,0);
    }
    }
    }
    }
    }
    }