• Hi community,
    So I tried to write a simple plugin that puts cars into the game. Easily extract the zip in your plugin directory and it should work.
    To get a car at your position type '/car [type]' in the chat, where [type] means a type of cars. I allready added two cars in this version: a Lexus and a Police car(the models are from tf3dm.com). To list all cars installed type '/car list'. If you want to see all commands the are possible type '/car help'.
    You can add your own cars by packing the obj and the dds anywhere in the assets directory (subdirectories allowed too) and create a [name].car directly in the assets folder (and [name] is the name that you have to type in the console later). Write the content of the .car file similar to those of the two other cars or write me for help.
    To destroy a car easily hit it with the pickaxe (or axe/...).


    Also ich hab versucht ein einfaches Plugin zu schreiben, welches dem Spiel Autos hinzufügt. Einfach die zip in den plugin Ordner entpacken und alles sollte funktionieren.
    Um ein Auto zu bekommen einfach '/car [type]' in den Chat eingeben, wobie [type] für einen Autotyp steht. In dieser Version habe ich schon zwei Autos hinzugefügt: einen Lexus und ein Polizeiauto(Police). (Die Modelle stammen von tf3dm.com). Um alle installierten Autos aufzulisten einfach '/car list' in den Chat eingeben. Um alle möglichen Kommandos anzuzeigen '/car help' eingeben.
    Du kannst deine eigenen Autos hinzufügen indem du die obj und die dds irgendwo in das assets Verzeichnis packst (auch Unterverzeichnisse erlaubt) und dann eine Datei [name].car direkt im assets Verzeichnis errstellst ([name] ist der Name der später in der Konsole eingegeben werden muss). Schreibe den Inahlt dieser .car Datei ähnlich dem der beiden anderen .car Dateien oder frag mich um Hilfe.
    Um ein Auto zu zerstören kannst du es einfach mit der Spitzhacke (oder Axt/...) schlagen.


    Of course there are still a few bugs. I will try to remove them in the future. Here's a list of current bugs and what I still want to add:
    •reworking the permissions; probably adding group support / limiting the maximum amount of cars a player could have
    •adding sound effects
    •adding fuel and screwdrivers to repair/refuel a cra as soon as it will be possible to add custom items/crafting recepies
    •adding more GUIs



    Here's a list of all parameters that you can put in the Config.txt:


    upsfloat numbertupdates per second
    deltafloat numberalternative to ups; time to wait between updates
    physicstrue/falseuse physics?
    physics_upsfloat numbertphysic updates per second
    physics_deltafloat numberalternative to physic_ups; time to wait between physic updates
    height_collisiontrue/falseshould all blocks to the height of the car be proofed for collision or only that one in front?
    collision_damagetrue/falseshould the car get collision damage?
    fall_damagetrue/falseshould the car get fall damage?
    bkuptrue/falseshould all cars be backuped?
    autobkupint numberAll cars get backuped all 'autobkup' seconds (if 'autobkup' > 0)?
    autobkup_messagetrue/falseShould a message be shown when cars are auto-backuped?
    message_carenter_globaltrue/falsesend a broadcast message when a player enters a car?
    message_carenter_privatetrue/falsesend a message to the player that enters a car?
    cardestroy_hitplayertrue/falsecan a player get hurt if he sits in a car that gets destroyed?
    carfueltrue/falseare cars loosing fuel while driving?
    carlivetrue/falseHave cars live? (else they will get destroyed at the first time you hit them)
    3dtextlivetrue/falsea 3d text on top of the car if the live is smaller than the maximum live?
    helpall/admin/nonewho is allowed to show help?
    carlistall/admin/nonewho is allowed to show car list?
    modellistall/admin/nonewho is allowed to show car models list?
    getidall/admin/nonewho is allowed to get a cars id?
    refuelMEall/admin/nonewho is allowed to refuel a selected car?
    repairMEall/admin/nonewho is allowed to repair a selected car?
    lockMEall/admin/nonewho is allowed to lock a selected car?
    refuelIDall/admin/nonewho is allowed to refuel car [ID]?
    repairIDall/admin/nonewho is allowed to repair car [ID]?
    lockIDall/admin/nonewho is allowed to lock car [ID]?
    saveall/admin/nonewho is allowed to save cars to file?
    carownerall/admin/nonewho is allowed to change owner of own car?
    carownerIDall/admin/nonewho is allowed to change owner of car [ID]?
    carspawnMEall/admin/nonewho is allowed to spawn a car at his position?
    carspawnPLAYERall/admin/nonewho is allowed to spawn a car at a certain players position?
    carspawnPOSITIONall/admin/nonewho is allowed to spawn a car at a certain position?
    carspawnPOSITIONRall/admin/nonewho is allowed to spawn a car at a certain position and rotation?
    carenterall/admin/nonewho is allowed to enter a car?
    carhitall/admin/nonewho is allowed to hit a car?
    gotocarall/admin/nonewho is allowed to go to a car?
    carinfoall/admin/nonewho is allowed to show car info?
    carmodelinfoall/admin/nonewho is allowed to show car model info?


    And here's a list of all parameters that you can put in a .car file:


    modeltextrelative path to the .obj file; mandatory parameter
    texturetextrelative path to the .dds file; mandatory parameter
    scalefloat numberscales car
    driverx, drivery, driverzfloat numbersets the position of the player relative to the car
    leavex, leavey, leavezfloat numbercorrects the position of the player when leaving it relative to the car
    xcorrect, ycorrect, zcorrectfloat numbercorrects the position of the car
    rxcorrect, rycorrect, rzcorrectfloat numbercorrects the rotation of the car
    livetextyfloat numbery position of the live text
    maxbpsfloat numbersets the maximum speed of the car in blocks per second
    accelbpsfloat numbersets the acceleration speed of the car in blocks per second
    backbpsfloat numbersets the maximum backward speed of the car in blocks per second
    brakebpsfloat numbersets the brake's speed of the car in blocks per second
    frictionbpsfloat numbersets the friction speed of the car in blocks per second (it's slowing the car doen)
    tcfloat numbersets the scope of turning cycle
    trfloat numbersets the radiusof turning cycle
    tdfloat numbersets the diameterof turning cycle
    livefloat numbersets the live
    fuelfloat numbersets the fuel tanks size in liters
    bouncefloat numberbounce factor (how strong it should bounce when falling down)
    massfloat numbermass of the car, which influences the falling speed
    heightfloat numberheight of the car (only needed when height_collision is turned on in the Config.txt)
    frontxfloat numberx-position of the front center point
    frontzfloat numberz-position of the front center point
    backxfloat numberx-position of the back center point
    backzfloat numberz-position of the back center point
    fuelconsumptionfloat numbersets the fuelconsumption in liter per block (while accelerating)
    lighting_enabledtrue/falseis the car model affected by light?


    All possible commands:
    •/car help
    •/car [type]
    •/car [type] #[forPlayer]
    •/car [type] [x] [y] [z]
    •/car [type] [x] [y] [z] [r]
    •/car refuel
    •/car repair
    •/car lock
    •/car refuel [id]
    •/car repair [id]
    •/car lock [id]
    •/car owner #[newPlayerOwner]
    •/car owner [id] #[newPlayerOwner]
    •/car list
    •/car listall
    •/car getid
    •/car save
    •/car info [type]
    •/car info [id]
    •/car goto [id]

  • Mir ist noch was aufgefallen:


    wenn man im MP diese autos setzt kann ich sie mit der Spitzhacke wieder weghauen, für einen anderen Spieler bleiben sie aber sichtbar.
    wenn man nun reloadplugins eingibt verschinden alle Fahrzeuge die gesetzt wurden.

  • Oh das erste wusst ich noch nicht...
    Das mit reloadplugins alle verschwinden wusste ich schon könnte ich aber durch speichern aller Fahrzeuge in einer Datei verhindern.


    Kann ich aber noch schnell fixen. Mal sehen entweder heut eoder morgen lade ich eine neue Version hoch

  • Funny this is what i was just talking about doing yesterday lol and behold someone does it. very nice job so far :-D

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • Hi community,
    I updated the plugin. Here are the new changes:
    •The plugin now saves all cars (for every world separate) if bkup option in the Config ist trrue (standard)
    •You can only rotate your car while driving forward or backward (feels more realistic), because multi key input is supported now
    •rotation speed isn't defined by the parameter dps though by tc(turning cycle->scope), dc(turning cycle->diameter) or(turning cycle->radius)

    •added Config-options 'onlyadmin_carspawn', 'onlyadmin_cardrive' and 'onlyadmin_cardestroy' options
    •fixed the bug that cars don't dissapear after hitting for other player on a server (I hope so)


    Hi community,
    Ich hab das Plugin geupdatet. Das sind die Änderungen:
    •Das Plugin speichert nun die Positionen aller Fahrzeuge (für jede Welt separat) wenn die bkup-Option in der Config true ist (Standard)
    •Ein Fahrzeug kann nun nur noch gedreht werden, während es vorwärts oder rückwärts fährt (realistischer), da nun mehrere Key-Inputs gleichzeitig akzeptiert werden
    •Rotationsgeschwindigkeit wird nicht mehr durch den Parameter dps, sondern durch tc(Wendekreis->Umfang), dc(Wendekreis->Durchmesser) oder (Wendekreis->Radius) definiert
    •Config-Optionen 'onlyadmin_carspawn', 'onlyadmin_cardrive' und 'onlyadmin_cardestroy' hinzugefügt
    •Bug, dass Autos auf Servern nach dem Zerstören nicht für alle Spieler verschwinden, behoben (hoffe ich)

  • Super
    Galveston01



    wie schauts den aus mit admin und spieler kann jetzt nur admin ein auto setzen oder auch spieler und vievile autos können spieler erstellen


    ich würde mal sagen das man spieler 1-10 autos spawnen können und admin zur verschönerung soviel wie sie wollen solange es nicht zu ruckeln anfäng


    so werde gleich testen ;)


    gruss an alle


    P.S habe mal versucht einen bus rein zu bringen ich weiss aber noch nicht obs so richtieg ist allso testet es mal


    Download ist raus

    Wier Die Ausgestossenen


    TS3: 78.31.64.46 - Gameserver: CS:S 78.31.64.46:27015 - RW: IPV6: [2001:4ba0:babe:1575::]:26015

    Edited 3 times, last by Ranaarvalis ().

  • Super Idee mit dem Bus :thumbsup:
    Ich hab es jetzt erstmal so gesetzt dass man in der Config festlegen kann ob nur Admins oder alle Spieler Autos erstellen/fahren/zerstören dürfen. Vielleicht füge ich irgendwann nochmal ein Maximum ein, bisher sind die Autos jedoch nciht auf einen Spieler festgesetzt sondern gehören nach dem erstellen quasi allen.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!