[SAMMELTHREAD] Kleine Scripting Fragen

Dein Problem konnte durch einen User gelöst werden? Bedank dich bei ihm indem du seinen Beitrag als Hilfreich markierst sowie einen Daumen oben dalässt
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
  • Und wie kann ich das dann richtig machen? Weil ich habe keine lust bei ca 40 Objekten immer oben ein new zu erstellen und dann


    awand1 = CreateObject(19398,-1452.0000000,2682.5000000,824.0999756,0.0000000,0.0000000,0.0000000);
    SetObjectMaterial(awand1,1, 5168, "lashops6_las2", "yellow2_128", 0);


    Kann man das irgendwie anderes machen?


    Hattest du mit der for-Schleife doch schon richtig gemacht, muss halt nur noch an meinen Code angepasst werden:


    for(new i; i<sizeof(SomeObjectArray); i++)
    SetObjectMaterial(SomeObjectArray[i],1, 5168, "lashops6_las2", "yellow2_128", 0);

  • Hattest du mit der for-Schleife doch schon richtig gemacht, muss halt nur noch an meinen Code angepasst werden:


    for(new i; i<sizeof(SomeObjectArray); i++)
    SetObjectMaterial(SomeObjectArray[i],1, 5168, "lashops6_las2", "yellow2_128", 0);


    Bekomme 2 Errors
    C:\Users\kleinkiko\Desktop\Map Server\gamemodes\Map.pwn(226 -- 227) : error 008: must be a constant expression; assumed zero
    C:\Users\kleinkiko\Desktop\Map Server\gamemodes\Map.pwn(229) : error 033: array must be indexed (variable "SomeObjectArray")


    Die Zeilen:

    new SomeObjectArray[sizeof(SomeObjectArguments)];


    for(new i; i < SomeObjectArray; i++) // Loop durch jedes Objekt für das du die Argumente oben eingegeben hast
    SomeObjectArray[i] = CreateObject(SomeObjectArguments[i][0], SomeObjectArguments[i][1], SomeObjectArguments[i][2], SomeObjectArguments[i][3], SomeObjectArguments[i][4], SomeObjectArguments[i][5], SomeObjectArguments[i][6]);


    for(new i; i<sizeof(SomeObjectArray); i++)
    SetObjectMaterial(SomeObjectArray[i],1, 5168, "lashops6_las2", "yellow2_128", 0);


    Hab alles in OnGameModeInit drin

    MfG kleinkiko

    Lust auf ein Rust Server? Dann schau doch mal HIER vorbei :)

  • kleinkiko:


    new Float:SomeObjectArguments[][7] = // Bin mir hier nicht ganz sicher ob das in PAWN möglich ist, also ob man die zweite Dimension eines Arrays explizit festlegen kann, ohne die erste zu bestimmen
    {
    { 19357.0,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19358.0,-1452.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19359.0,-1451.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 }
    // Für jedes weitere Objekt fügst du hier die Koordinaten und den ganzen Shit ein, den die Funktion CreateObject erfordert
    };


    for(new i; i < sizeof(SomeObjectArray); i++) // Loop durch jedes Objekt für das du die Argumente oben eingegeben hast
    SomeObjectArray[i] = CreateObject(floatround(SomeObjectArguments[i][0], floatround_ceil), SomeObjectArguments[i][1], SomeObjectArguments[i][2], SomeObjectArguments[i][3], SomeObjectArguments[i][4], SomeObjectArguments[i][5], SomeObjectArguments[i][6]);





    Sollte so klappen, hab das eben gecheckt.


  • Bekomme zwei Errors:
    C:\Users\kleinkiko\Desktop\Map Server\gamemodes\Map.pwn(227) : error 029: invalid expression, assumed zero
    C:\Users\kleinkiko\Desktop\Map Server\gamemodes\Map.pwn(227) : error 008: must be a constant expression; assumed zero


    Hier mein ganzer Code im Spoiler:

    Spoiler anzeigen
    new Float:SomeObjectArguments[][7] = // Bin mir hier nicht ganz sicher ob das in PAWN möglich ist, also ob man die zweite Dimension eines Arrays explizit festlegen kann, ohne die erste zu bestimmen
    {
    { 19357,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19358,-1452.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19359,-1451.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19357,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 } , //amt 9570(15)
    { 19357,-1460.2999268,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(21)
    { 19357,-1466.6998291,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(23)
    { 19357,-1469.8997803,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(24)
    { 19357,-1458.5000000,2660.0002441,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1460.1999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(32)
    { 19357,-1466.5000000,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(34)
    { 19357,-1469.6999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.9000244,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(36)
    { 19357,-1476.0999756,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(37)
    { 19357,-1465.1999512,2658.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1465.1999512,2655.1000977,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2666.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2672.8999023,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1469.5999756,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.8000488,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1476.0000000,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1468.0000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2682.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1447.5999756,2660.0000000,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (1)
    { 19357,-1450.8000488,2660.0000000,821.9000244,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (2)
    { 19357,-1450.8000488,2660.0000000,826.7999878,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (3)
    { 1649,-1450.8000488,2660.0000000,826.0000000,0.0000000,0.0000000,180.0000000}, //object(wglasssmash) (1)
    { 19357,-1453.9000244,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (5)
    { 19357,-1447.5999756,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (6)
    { 19357,-1449.0999756,2666.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (7)
    { 19357,-1449.0999756,2669.6999512,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (8)
    { 19357,-1449.0999756,2672.8999023,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (9)
    { 19357,-1450.5999756,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (10)
    { 19357,-1453.8000488,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (11)
    { 19357,-1457.0000000,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (12)
    { 19357,-1458.5000000,2672.8000488,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (13)
    { 19357,-1458.5000000,2669.6000977,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (14)
    { 19357,-1457.0999756,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (15)
    { 19357,-1453.6999512,2677.6000977,826.9000244,0.0000000,0.0000000,90.0000000} , //object(road_sfw11) (33)
    { 19357,-1456.9000244,2677.6000977,824.0999756,0.0000000,0.0000000,90.0000000} , //object(road_sfw11) (28)
    { 19357,-1453.6999512,2677.6000977,821.7999878,0.0000000,0.0000000,90.0000000} , //object(road_sfw11) (30)
    { 19357,-1452.0000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (31)
    { 19357,-1458.5000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (32)
    { 19357,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(15)
    { 19357,-1460.2999268,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(21)
    { 19357,-1466.6998291,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(23)
    { 19357,-1469.8997803,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(24)
    { 19357,-1458.5000000,2660.0002441,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1460.1999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(32)
    { 19357,-1466.5000000,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(34)
    { 19357,-1469.6999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.9000244,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(36)
    { 19357,-1476.0999756,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(37)
    { 19357,-1465.1999512,2658.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1465.1999512,2655.1000977,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2666.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2672.8999023,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1469.5999756,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.8000488,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1476.0000000,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1468.0000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2682.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    // Für jedes weitere Objekt fügst du hier die Koordinaten und den ganzen Shit ein, den die Funktion CreateObject erfordert
    };

    Spoiler anzeigen
    for(new i; i < sizeof(SomeObjectArray); i++) // Loop durch jedes Objekt für das du die Argumente oben eingegeben hast
    SomeObjectArray[i] = CreateObject(floatround(SomeObjectArguments[i][0], floatround_ceil), SomeObjectArguments[i][1], SomeObjectArguments[i][2], SomeObjectArguments[i][3], SomeObjectArguments[i][4], SomeObjectArguments[i][5], SomeObjectArguments[i][6]);

    Spoiler anzeigen
    for(new i; i<sizeof(SomeObjectArray); i++)
    SetObjectMaterial(SomeObjectArray[i],1, 5168, "lashops6_las2", "yellow2_128", 0);

    MfG kleinkiko

    Lust auf ein Rust Server? Dann schau doch mal HIER vorbei :)

  • Du musst auch das letzte Komma im Array entfernen, danach kommt ja nichts mehr. ;)


    { 19357,-1468.0000000,2682.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    // Für jedes weitere Objekt fügst du hier die Koordinaten und den ganzen Shit ein, den die Funktion CreateObject erfordert
    };


    zu


    { 19357,-1468.0000000,2682.5000000,824.0999756,0.0000000,0.0000000,0.0000000} //amt 9570(28)
    // Für jedes weitere Objekt fügst du hier die Koordinaten und den ganzen Shit ein, den die Funktion CreateObject erfordert
    };


  • Hab nun das Problem das die anderen Objecte nicht mehr da sind genauso wie die Texturen :/
    Hier ein Bild:

    MfG kleinkiko

    Lust auf ein Rust Server? Dann schau doch mal HIER vorbei :)

  • Hallo erstmal,
    bin gerade dabei MySQL zu lernen, soweit so gut.
    Doch ich bekomme beim connecten zur Datenbank immer einen Error.

    SQL
    Function: mysql_init executed with result: "0".
    Error (0): Failed to connect. Access denied for user 'syncid'@'localhost' (using password: YES).


    Kann mir jemand helfen?
    Mfg Syncid

  • Hallo erstmal,
    bin gerade dabei MySQL zu lernen, soweit so gut.
    Doch ich bekomme beim connecten zur Datenbank immer einen Error.

    SQL
    Function: mysql_init executed with result: "0".
    Error (0): Failed to connect. Access denied for user 'syncid'@'localhost' (using password: YES).


    Kann mir jemand helfen?
    Mfg Syncid


    falsches passwort zum benutzer, nimm einfach den "root" und ohne passwort


  • falsches passwort zum benutzer, nimm einfach den "root" und ohne passwort

    Hat leider nichts bewirkt oder habe ich etwas falsch gemacht?
    Hier einmal mein Code ( Ohne deinen Tipp )
    #define sqlHost "127.0.0.1"
    #define sqlUser "Palomino"
    #define sqlPass "creek"
    #define sqlData "pc_rp"


    Und du meinst ich soll es so machen, oder?
    #define sqlHost "127.0.0.1"
    #define sqlUser "root"
    #define sqlPass ""
    #define sqlData "pc_rp"

  • Ganz oben im Script:
    new SomeObjectArray[70];


    Unter OnGameModeInit
    /*new Float:SomeObjectArguments[][7] = // Bin mir hier nicht ganz sicher ob das in PAWN möglich ist, also ob man die zweite Dimension eines Arrays explizit festlegen kann, ohne die erste zu bestimmen
    {
    { 19357,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19358,-1452.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19359,-1451.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },
    { 19357,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 } , //amt 9570(15)
    { 19357,-1460.2999268,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(21)
    { 19357,-1466.6998291,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(23)
    { 19357,-1469.8997803,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(24)
    { 19357,-1458.5000000,2660.0002441,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1460.1999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(32)
    { 19357,-1466.5000000,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(34)
    { 19357,-1469.6999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.9000244,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(36)
    { 19357,-1476.0999756,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(37)
    { 19357,-1465.1999512,2658.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1465.1999512,2655.1000977,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2666.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2672.8999023,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1469.5999756,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.8000488,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1476.0000000,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1468.0000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2682.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1447.5999756,2660.0000000,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (1)
    { 19357,-1450.8000488,2660.0000000,821.9000244,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (2)
    { 19357,-1450.8000488,2660.0000000,826.7999878,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (3)
    { 1649,-1450.8000488,2660.0000000,826.0000000,0.0000000,0.0000000,180.0000000}, //object(wglasssmash) (1)
    { 19357,-1453.9000244,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (5)
    { 19357,-1447.5999756,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (6)
    { 19357,-1449.0999756,2666.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (7)
    { 19357,-1449.0999756,2669.6999512,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (8)
    { 19357,-1449.0999756,2672.8999023,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (9)
    { 19357,-1450.5999756,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (10)
    { 19357,-1453.8000488,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (11)
    { 19357,-1457.0000000,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (12)
    { 19357,-1458.5000000,2672.8000488,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (13)
    { 19357,-1458.5000000,2669.6000977,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (14)
    { 19357,-1457.0999756,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //object(road_sfw11) (15)
    { 19357,-1453.6999512,2677.6000977,826.9000244,0.0000000,0.0000000,90.0000000} , //object(road_sfw11) (33)
    { 19357,-1456.9000244,2677.6000977,824.0999756,0.0000000,0.0000000,90.0000000} , //object(road_sfw11) (28)
    { 19357,-1453.6999512,2677.6000977,821.7999878,0.0000000,0.0000000,90.0000000} , //object(road_sfw11) (30)
    { 19357,-1452.0000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (31)
    { 19357,-1458.5000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //object(road_sfw11) (32)
    { 19357,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(15)
    { 19357,-1460.2999268,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(21)
    { 19357,-1466.6998291,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(23)
    { 19357,-1469.8997803,2660.0000000,824.0000000,0.0000000,0.0000000,90.0000000}, //amt 9570(24)
    { 19357,-1458.5000000,2660.0002441,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1460.1999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(32)
    { 19357,-1466.5000000,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(34)
    { 19357,-1469.6999512,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.9000244,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(36)
    { 19357,-1476.0999756,2664.8999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(37)
    { 19357,-1465.1999512,2658.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1465.1999512,2655.1000977,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2666.5000000,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2672.8999023,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1469.5999756,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1472.8000488,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1476.0000000,2674.3999023,824.0999756,0.0000000,0.0000000,90.0000000}, //amt 9570(35)
    { 19357,-1468.0000000,2679.3000488,824.0999756,0.0000000,0.0000000,0.0000000}, //amt 9570(28)
    { 19357,-1468.0000000,2682.5000000,824.0999756,0.0000000,0.0000000,0.0000000} //amt 9570(28)
    // Für jedes weitere Objekt fügst du hier die Koordinaten und den ganzen Shit ein, den die Funktion CreateObject erfordert
    };


    for(new i; i < sizeof(SomeObjectArray); i++) // Loop durch jedes Objekt für das du die Argumente oben eingegeben hast
    SomeObjectArray[i] = CreateObject(floatround(SomeObjectArguments[i][0], floatround_ceil), SomeObjectArguments[i][1], SomeObjectArguments[i][2], SomeObjectArguments[i][3], SomeObjectArguments[i][4], SomeObjectArguments[i][5], SomeObjectArguments[i][6]);


    for(new i; i<sizeof(SomeObjectArray); i++)
    SetObjectMaterial(SomeObjectArray[i],1, 5168, "lashops6_las2", "yellow2_128", 0);*/


    Sobald ich den Code nehme spawnt mittlerweile garnichts mehr. Wenn ich ihn wieder rausnehme spawnt alles wie gewohnt :o nur halt ohne Texturen

    MfG kleinkiko

    Lust auf ein Rust Server? Dann schau doch mal HIER vorbei :)

  • Du hättest mal wegen den ganzen Warnungen Bescheid geben können. Das ist ein Float Array, also darf die Objekt ID natürlich auch kein Integer sein.


    { 19357.0,-1458.5000000,2666.4001465,824.0999756,0.0000000,0.0000000,0.0000000 },


    Deshalb auch die Rundungsfunktion unten.


    Übrigens ist folgendes:
    new SomeObjectArray[70];
    unwartbarer Code, es hat einen Grund warum ich das so konzipiert habe, dass man nur die neuen Objekte im Array einfügt und sonst nichts ändern muss.


    new SomeObjectArray[sizeof(SomeObjectArguments)];
    nach dem Array einfügen, sizeof() gibt in diesem Fall die Speichergröße des Arrays zurück was der Zahl der Einträge in diesem Array entspricht.


  • Die Funktzion ist dazu da mehrere Sachen zb Ränge nebeneinander zu Speichern die mit einem "|" getrennt werden.
    Bei mir Speichere ich hald die Zahlen nebeneinader doch beim Laden wird aus der ersten 1 eine 0.
    Sehe in meinem Code keinen Fehler.

    seekrass approved
    4x vom Discord geflogen


    shoxinat0r 4
    dennismitzwein 2
    Trooper[Y] 2
    maddin 1
    Unbekannter Discord Kick 2
  • @TheBlueFireKing:



    // Input
    new string[6] = "2|1|3";
    new res[3][2];

    split(string, res, '|');


    for(new i; i < sizeof(res); i++)
    printf("Split: %s", res[i]);


    stock split(const strsrc[], strdest[][], delimiter)
    {
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc))
    {
    if(strsrc[i] == delimiter || i == strlen(strsrc))
    {
    len = strmid(strdest[aNum], strsrc, li, i, 128);
    strdest[aNum][len] = 0;
    li = i+1;
    aNum++;
    }
    i++;
    }
    return 1;
    }

  • new SomeObjectArray[sizeof(SomeObjectArguments)];



    Klappt leider immer noch nicht nun sind wieder alle Objekte weg. Kannst du vllt mal per TeamView schauen?

    MfG kleinkiko

    Lust auf ein Rust Server? Dann schau doch mal HIER vorbei :)

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