Haus System 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
  • Tag Scripter &co.


    Ich hab folgendes Problem:


    Ich hab auf meinem Server ein Haussystem doch ingame hab ich keine Häuser bzw , ich weis nicht wie man welche erstellt.


    In meinem Script sieht es so aus:


    #define MAX_HOUSES 500
    #define COLOR_HOUSELABEL 0xF6B400F6//Farbe der Scrift was auf den haus icon steht
    enum hInfo
    {
    hOwned,
    hOwner[MAX_PLAYER_NAME],
    hDescr[50],
    Float:hEntrx,
    Float:hEntry,
    Float:hEntrz,
    Float:hIntx,
    Float:hInty,
    Float:hIntz,
    hInt,
    hRentable,
    hPrice,
    hRent,
    Text3D:hLabel,
    hPick,
    hIntid,
    hLocked,
    hKasse
    }
    new HouseInfo[MAX_HOUSES][hInfo];
    enum int_enum
    {
    Float:intpx,
    Float:intpy,
    Float:intpz,
    interiorid,
    description[50]
    }
    new Interiors[][int_enum] = {
    {235.508994 ,1189.169897 ,1080.339966, 3, "Groß, 2 Stock"},
    {225.756989 ,1240.000000 ,1082.149902, 2, "Mittelgroß, 1 Stock"},
    {223.043991 ,1289.259888 ,1082.199951, 1, "Klein, 1 Stock"},
    {225.630997 ,1022.479980 ,1084.069946, 7, "Villa"},
    {295.138977 ,1474.469971 ,1080.519897, 15, "Klein, 1 Stock"},
    {328.493988 ,1480.589966 ,1084.449951, 15, "Klein, 1 Stock"},
    {344.3000,305.2000,999.1484,6,"Domina Hütte"},
    {386.9591,1471.6937,1080.1949,15,"Mittel, 1 Stock"},
    {234.3189,1063.7469,1084.2123,6,"Sehr Groß! 2 Stock"},
    {23.5581,1340.3097,1084.3750,10,"Groß, Stock"},
    {385.803986 ,1471.769897 ,1080.209961, 15, "Klein, 1 Stock"}
    };
    stock Float:GetX(i)
    {
    new Float:xasdf, Float:yasdf, Float:zasdf;
    GetPlayerPos(i, xasdf, yasdf, zasdf);
    return Float:xasdf;
    }


    stock Float:GetY(i)
    {
    new Float:xasdf, Float:yasdf, Float:zasdf;
    GetPlayerPos(i, xasdf, yasdf, zasdf);
    return yasdf;
    }


    stock Float:GetZ(i)
    {
    new Float:xasdf, Float:yasdf, Float:zasdf;
    GetPlayerPos(i, xasdf, yasdf, zasdf);
    return zasdf;
    }


    stock Float:GetA(i)
    {
    new Float:xasdf;
    GetPlayerFacingAngle(i, xasdf);
    return xasdf;
    }
    stock GetVehicleSpeed(vehicleid, &Float:Speed)
    {
    new Float:X,Float:Y,Float:Z;
    GetVehicleVelocity(vehicleid, X, Y, Z);
    Speed = floatsqroot(X*X + Y*Y + Z*Z)*200;
    }
    stock IsAutoAn(vid)
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine == VEHICLE_PARAMS_ON) return 1;
    return 0;
    }


    Ich hoffe das ihr mir helfen könnt ,
    Ich will halt ingame Häuser erstellen können.



    MfG
    Safak

  • Dann erstell dir mal ein Command. ( für das Haussytem.. )
    Gebe dir mal ein Beispiel aus meinen Script.
    Du musst das halt an deins Anpassen!


    ocmd:erstellen(playerid,params[])
    {
    if(!IsPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Du bist kein Administrator.");
    new preis, interior;
    if(sscanf(params,"ii",preis,interior))return SendClientMessage(playerid,LILA,"/erstellen [preis] [interiorid]");
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    CreateHaus(x,y,z,preis,"Keiner",interior);
    return 1;
    }


    /e pwn code

  • Du gehst irgendwo ins Script..
    Du machst dir ne Zeile unter OnPlayerCommand ( das ist einfach Random )
    Die nennst du //OCMDS -
    Da fügst du dann den Befehl ein.. musst ihn halt anpassen, versuch mal ob der so passt.
    Falls Errors kommen poste die dann ;)

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen