Problem bei : Bloods-Fraktion einfügen

  • Ultimate
  • Problem bei : Bloods-Fraktion einfügen

    Neu

    LUA-Quellcode: bloods_vehicles

    1. local r,g,b = 254,0,0
    2. local bloodscars = {
    3. createFactionVehicle ( 522, -1939.4000244141, -1041.9000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike
    4. createFactionVehicle ( 522, -1939.4000244141, -1045.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike
    5. createFactionVehicle ( 522, -1939.4000244141, -1049.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike
    6. createFactionVehicle ( 522, -1939.4000244141, -1053.3000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike
    7. createFactionVehicle ( 522, -1939.4000244141, -1056.6999511719, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike
    8. createFactionVehicle ( 522, -1938, -1061.4000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS") ,--Bike
    9. createFactionVehicle ( 522, -1938, -1064.8000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike
    10. createFactionVehicle ( 470, -1949.1999511719, -1085.5999755859, 30.89999961853, 0, 0, 0,17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"),--Patriot
    11. createFactionVehicle ( 470, -1942.1999511719, -1085.8000488281, 30.89999961853, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Patriot
    12. createFactionVehicle ( 495, -1952, -1048.3000488281, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Sandking
    13. createFactionVehicle ( 495, -1952, -1054.9000244141, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Sandking
    14. createFactionVehicle ( 482, -1952.3000488281, -1040.0999755859, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Burrito
    15. createFactionVehicle ( 482, -1952.3000488281,-1033.4000244141, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Burrito
    16. createFactionVehicle ( 482, -1952.3000488281, -1026.3000488281, 32.400001525879, 0, 0,0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Burrito
    17. createFactionVehicle ( 424, -1942.8000488281, -1042, 32, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --BF-Injection
    18. createFactionVehicle ( 504, -1949.9000244141, -1061, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "Bloods"), --Bloodring Banger
    19. createFactionVehicle ( 489, -1938.9000244141, -1029.9000244141, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Rancher
    20. createFactionVehicle ( 489, -1938.8000488281, -1023, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Rancher
    21. createFactionVehicle ( 489, -1939.6999511719, -1037.8000488281, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "Bloods"), --Rancher
    22. createFactionVehicle ( 487, -1946, -1049.1999511719, 53.599998474121, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "Bloods"), --Maverick
    23. createFactionVehicle ( 447, -1961.6999511719, -1048.6999511719, 53.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS") --Seasparrow
    24. }
    25. for i=1, #bloodscars do
    26. setVehicleColor ( bloodscars[i], 254, 0, 0 )
    27. end
    Alles anzeigen
    Das Problem ist, dass die Autos nicht spawnen. Folgender Errorcode wird im Debugscript angezeigt: .../bloods_vehicles.lua:6:attempt to call global 'createFactionVehicle' (a nil value)
    und
    .../bloods_vehicles.lua:6: '}' expected to close '{' at line 5 near '='.

    Würde mich über schnelle Hilfe freuen ?(
  • Neu

    Erstell eine Tabelle und füg da die Fahrzeuge ein

    Bloodcars = {}
    Bloodcars[1] = createFactionVehicle(.....)
    ...
    ...

    Und mach am besten dieses "Bloods" weg und nutze setVehiclePlateText in deiner for-schleife

    wiki.multitheftauto.com/wiki/SetVehiclePlateText

    Edit:

    Kannst das eigentlich mit den Nummernschildern lassen, da Ultimate die Nummernschilder der Fraktionen automatisch mit dem Namen der Fraktion überschreibt

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Bobby ()

  • Neu

    Quellcode

    1. local r,g,b = 254,0,0
    2. local bloodscars = {
    3. createFactionVehicle ( 522, -1939.4000244141, -1041.9000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike
    4. createFactionVehicle ( 522, -1939.4000244141, -1045.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike
    5. createFactionVehicle ( 522, -1939.4000244141, -1049.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike
    6. createFactionVehicle ( 522, -1939.4000244141, -1053.3000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike
    7. createFactionVehicle ( 522, -1939.4000244141, -1056.6999511719, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0), --Bike
    8. createFactionVehicle ( 522, -1938, -1061.4000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0) ,--Bike
    9. createFactionVehicle ( 522, -1938, -1064.8000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike
    10. createFactionVehicle ( 470, -1949.1999511719, -1085.5999755859, 30.89999961853, 0, 0, 0,17, 3, 0, 8, 9, 14, 0, 0, 0, 0),--Patriot
    11. createFactionVehicle ( 470, -1942.1999511719, -1085.8000488281, 30.89999961853, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Patriot
    12. createFactionVehicle ( 495, -1952, -1048.3000488281, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Sandking
    13. createFactionVehicle ( 495, -1952, -1054.9000244141, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Sandking
    14. createFactionVehicle ( 482, -1952.3000488281, -1040.0999755859, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Burrito
    15. createFactionVehicle ( 482, -1952.3000488281,-1033.4000244141, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Burrito
    16. createFactionVehicle ( 482, -1952.3000488281, -1026.3000488281, 32.400001525879, 0, 0,0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Burrito
    17. createFactionVehicle ( 424, -1942.8000488281, -1042, 32, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --BF-Injection
    18. createFactionVehicle ( 504, -1949.9000244141, -1061, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bloodring Banger
    19. createFactionVehicle ( 489, -1938.9000244141, -1029.9000244141, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Rancher
    20. createFactionVehicle ( 489, -1938.8000488281, -1023, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Rancher
    21. createFactionVehicle ( 489, -1939.6999511719, -1037.8000488281, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Rancher
    22. createFactionVehicle ( 487, -1946, -1049.1999511719, 53.599998474121, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Maverick
    23. createFactionVehicle ( 447, -1961.6999511719, -1048.6999511719, 53.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ) --Seasparrow
    24. }
    25. for i=1, #bloodscars do
    26. setVehicleColor ( bloodscars[i], 254, 0, 0 )
    27. end
    Alles anzeigen
    Noch ein Fehler: bloods_vehicles.lua:6:attempt to call global 'createFactionVehicle' (a nil value) (der selbe wie vorher)
  • Neu

    Bobby schrieb:

    Erstell eine Tabelle und füg da die Fahrzeuge ein

    Bloodcars = {}
    Bloodcars[1] = createFactionVehicle(.....)
    ...
    ...

    Und mach am besten dieses "Bloods" weg und nutze setVehiclePlateText in deiner for-schleife

    wiki.multitheftauto.com/wiki/SetVehiclePlateText

    Edit:

    Kannst das eigentlich mit den Nummernschildern lassen, da Ultimate die Nummernschilder der Fraktionen automatisch mit dem Namen der Fraktion überschreibt
    Das habe ich eigentlich schon gemacht

    LUA-Quellcode

    1. local bloodscars = {
    2. createFactionVehicle ( 522, -1939.4000244141, -1041.9000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ),
    3. .....
    4. .....
    5. }
  • Neu

    LUA-Quellcode

    1. local r,g,b = 254,0,0
    2. local bloodscars = {
    3. createFactionVehicle ( 522, -1939.4000244141, -1041.9000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14 ), --Bike
    4. createFactionVehicle ( 522, -1939.4000244141, -1045.5, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike
    5. createFactionVehicle ( 522, -1939.4000244141, -1049.5, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike
    6. createFactionVehicle ( 522, -1939.4000244141, -1053.3000488281, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike
    7. createFactionVehicle ( 522, -1939.4000244141, -1056.6999511719, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike
    8. createFactionVehicle ( 522, -1938, -1061.4000244141, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike
    9. createFactionVehicle ( 470, -1949.1999511719, -1085.5999755859, 30.89999961853, 0, 0, 0,14, 3, 0, 8, 9),--Patriot
    10. createFactionVehicle ( 470, -1942.1999511719, -1085.8000488281, 30.89999961853, 0, 0, 0, 14, 3, 0, 8, 9), --Patriot
    11. createFactionVehicle ( 495, -1952, -1048.3000488281, 32.700000762939, 0, 0, 0, 14, 3, 0, 8, 9), --Sandking
    12. createFactionVehicle ( 495, -1952, -1054.9000244141, 32.700000762939, 0, 0, 0, 14, 3, 0, 8, 9 ), --Sandking
    13. createFactionVehicle ( 482, -1952.3000488281, -1040.0999755859, 32.400001525879, 0, 0, 0, 14, 3, 0, 8, 9), --Burrito
    14. createFactionVehicle ( 482, -1952.3000488281,-1033.4000244141, 32.400001525879, 0, 0, 0, 14, 3, 0, 8, 9), --Burrito
    15. createFactionVehicle ( 482, -1952.3000488281, -1026.3000488281, 32.400001525879, 0, 0,0, 14, 3, 0, 8, 9), --Burrito
    16. createFactionVehicle ( 424, -1942.8000488281, -1042, 32, 0, 0, 0, 14, 3, 0, 8, 9), --BF-Injection
    17. createFactionVehicle ( 504, -1949.9000244141, -1061, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bloodring Banger
    18. createFactionVehicle ( 489, -1938.9000244141, -1029.9000244141, 32.5, 0, 0, 0, 14, 3, 0, 8, 9 ), --Rancher
    19. createFactionVehicle ( 489, -1938.8000488281, -1023, 32.5, 0, 0, 0, 14, 3, 0, 8, 9), --Rancher
    20. createFactionVehicle ( 489, -1939.6999511719, -1037.8000488281, 32.5, 0, 0, 0, 14, 3, 0, 8, 9), --Rancher
    21. createFactionVehicle ( 487, -1946, -1049.1999511719, 53.599998474121, 0, 0, 0, 14, 3, 0, 8, 9 ), --Maverick
    22. createFactionVehicle ( 447, -1961.6999511719, -1048.6999511719, 53.400001525879, 0, 0, 0, 14, 3, 0, 8, 9 ) --Seasparrow
    23. }
    24. for i=1, #bloodscars do
    25. setVehicleColor ( bloodscars[i], 254, 0, 0 )
    26. end
    Alles anzeigen
    Hab es jetzt soweit gemacht, trotzdem zeigt der Debugscript den gleichen Errorcode an: Noch ein Fehler: bloods_vehicles.lua:6:attempt to call global 'createFactionVehicle' (a nil value)

    Die Autos spawnen auch nicht.
  • Neu

    LUA-Quellcode

    1. local bloodscars = {}
    2. bloodscars[1] = createFactionVehicle ( 522, -1939.4, -1041.9, 31.8, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bike
    3. bloodscars[2] = createFactionVehicle ( 522, -1939.4, -1045.5, 31.8, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bike
    4. bloodscars[3] = createFactionVehicle ( 522, -1939.4, -1049.5, 31.8, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bike
    5. bloodscars[4] = createFactionVehicle ( 522, -1939.4, -1053.3, 31.8, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bike
    6. bloodscars[5] = createFactionVehicle ( 522, -1939.4, -1056.7, 31.8, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bike
    7. bloodscars[6] = createFactionVehicle ( 522, -1938.0, -1061.4, 31.8, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bike
    8. bloodscars[7] = createFactionVehicle ( 470, -1949.2, -1085.6, 30.9, 0, 0, 0, 14, 3, 0, 8, 9 ), --Patriot
    9. bloodscars[8] = createFactionVehicle ( 470, -1942.2, -1085.8, 30.9, 0, 0, 0, 14, 3, 0, 8, 9 ), --Patriot
    10. bloodscars[9] = createFactionVehicle ( 495, -1952.0, -1048.3, 32.7, 0, 0, 0, 14, 3, 0, 8, 9 ), --Sandking
    11. bloodscars[10] = createFactionVehicle ( 495, -1952.0, -1054.9, 32.7, 0, 0, 0, 14, 3, 0, 8, 9 ), --Sandking
    12. bloodscars[11] = createFactionVehicle ( 482, -1952.3, -1040.1, 32.4, 0, 0, 0, 14, 3, 0, 8, 9 ), --Burrito
    13. bloodscars[12] = createFactionVehicle ( 482, -1952.3, -1033.4, 32.4, 0, 0, 0, 14, 3, 0, 8, 9 ), --Burrito
    14. bloodscars[13] = createFactionVehicle ( 482, -1952.3, -1026.3, 32.4, 0, 0, 0, 14, 3, 0, 8, 9 ), --Burrito
    15. bloodscars[14] = createFactionVehicle ( 424, -1942.8, -1042.0, 32.0, 0, 0, 0, 14, 3, 0, 8, 9 ), --BF-Injection
    16. bloodscars[15] = createFactionVehicle ( 504, -1949.9, -1061.0, 31.8, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bloodring Banger
    17. bloodscars[16] = createFactionVehicle ( 489, -1938.9, -1029.9, 32.5, 0, 0, 0, 14, 3, 0, 8, 9 ), --Rancher
    18. bloodscars[17] = createFactionVehicle ( 489, -1938.8, -1023.0, 32.5, 0, 0, 0, 14, 3, 0, 8, 9 ), --Rancher
    19. bloodscars[18] = createFactionVehicle ( 489, -1939.7, -1037.8, 32.5, 0, 0, 0, 14, 3, 0, 8, 9 ), --Rancher
    20. bloodscars[19] = createFactionVehicle ( 487, -1946.0, -1049.2, 53.6, 0, 0, 0, 14, 3, 0, 8, 9 ), --Maverick
    21. bloodscars[20] = createFactionVehicle ( 447, -1961.7, -1048.7, 53.4, 0, 0, 0, 14, 3, 0, 8, 9 ) --Seasparrow
    22. for k, v in pairs ( bloodscars ) do
    23. setVehicleColor(v, 254, 0, 0, 254, 0, 0, 254, 0, 0)
    24. end
    Alles anzeigen
  • Neu

    XML-Quellcode

    1. (Bloods fraktion!)
    2. <script src="fraktionen\bloods\blood_duty.lua" type="client" />
    3. <script src="fraktionen\bloods\blood_vehicles.lua" type="server" />
    4. <script src="fraktionen\bloods\blood_gate2.lua" type="client" />
    So? Hab es jetzt 'serverseitig' gestellt.