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:
ups | float numbert | updates per second |
delta | float number | alternative to ups; time to wait between updates |
physics | true/false | use physics? |
physics_ups | float numbert | physic updates per second |
physics_delta | float number | alternative to physic_ups; time to wait between physic updates |
height_collision | true/false | should all blocks to the height of the car be proofed for collision or only that one in front? |
collision_damage | true/false | should the car get collision damage? |
fall_damage | true/false | should the car get fall damage? |
bkup | true/false | should all cars be backuped? |
autobkup | int number | All cars get backuped all 'autobkup' seconds (if 'autobkup' > 0)? |
autobkup_message | true/false | Should a message be shown when cars are auto-backuped? |
message_carenter_global | true/false | send a broadcast message when a player enters a car? |
message_carenter_private | true/false | send a message to the player that enters a car? |
cardestroy_hitplayer | true/false | can a player get hurt if he sits in a car that gets destroyed? |
carfuel | true/false | are cars loosing fuel while driving? |
carlive | true/false | Have cars live? (else they will get destroyed at the first time you hit them) |
3dtextlive | true/false | a 3d text on top of the car if the live is smaller than the maximum live? |
help | all/admin/none | who is allowed to show help? |
carlist | all/admin/none | who is allowed to show car list? |
modellist | all/admin/none | who is allowed to show car models list? |
getid | all/admin/none | who is allowed to get a cars id? |
refuelME | all/admin/none | who is allowed to refuel a selected car? |
repairME | all/admin/none | who is allowed to repair a selected car? |
lockME | all/admin/none | who is allowed to lock a selected car? |
refuelID | all/admin/none | who is allowed to refuel car [ID]? |
repairID | all/admin/none | who is allowed to repair car [ID]? |
lockID | all/admin/none | who is allowed to lock car [ID]? |
save | all/admin/none | who is allowed to save cars to file? |
carowner | all/admin/none | who is allowed to change owner of own car? |
carownerID | all/admin/none | who is allowed to change owner of car [ID]? |
carspawnME | all/admin/none | who is allowed to spawn a car at his position? |
carspawnPLAYER | all/admin/none | who is allowed to spawn a car at a certain players position? |
carspawnPOSITION | all/admin/none | who is allowed to spawn a car at a certain position? |
carspawnPOSITIONR | all/admin/none | who is allowed to spawn a car at a certain position and rotation? |
carenter | all/admin/none | who is allowed to enter a car? |
carhit | all/admin/none | who is allowed to hit a car? |
gotocar | all/admin/none | who is allowed to go to a car? |
carinfo | all/admin/none | who is allowed to show car info? |
carmodelinfo | all/admin/none | who is allowed to show car model info? |
And here's a list of all parameters that you can put in a .car file:
model | text | relative path to the .obj file; mandatory parameter |
texture | text | relative path to the .dds file; mandatory parameter |
scale | float number | scales car |
driverx, drivery, driverz | float number | sets the position of the player relative to the car |
leavex, leavey, leavez | float number | corrects the position of the player when leaving it relative to the car |
xcorrect, ycorrect, zcorrect | float number | corrects the position of the car |
rxcorrect, rycorrect, rzcorrect | float number | corrects the rotation of the car |
livetexty | float number | y position of the live text |
maxbps | float number | sets the maximum speed of the car in blocks per second |
accelbps | float number | sets the acceleration speed of the car in blocks per second |
backbps | float number | sets the maximum backward speed of the car in blocks per second |
brakebps | float number | sets the brake's speed of the car in blocks per second |
frictionbps | float number | sets the friction speed of the car in blocks per second (it's slowing the car doen) |
tc | float number | sets the scope of turning cycle |
tr | float number | sets the radiusof turning cycle |
td | float number | sets the diameterof turning cycle |
live | float number | sets the live |
fuel | float number | sets the fuel tanks size in liters |
bounce | float number | bounce factor (how strong it should bounce when falling down) |
mass | float number | mass of the car, which influences the falling speed |
height | float number | height of the car (only needed when height_collision is turned on in the Config.txt) |
frontx | float number | x-position of the front center point |
frontz | float number | z-position of the front center point |
backx | float number | x-position of the back center point |
backz | float number | z-position of the back center point |
fuelconsumption | float number | sets the fuelconsumption in liter per block (while accelerating) |
lighting_enabled | true/false | is 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]