Forum

> > CS2D > Scripts > About car lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English About car lua

4 replies
To the start Previous 1 Next To the start

old About car lua

ReVoltage
User Off Offline

Quote
Hello us ,
I have a question, how does the car lua works?
I mean the car move it self with the player.
How does it work? Does it set player position to the car image? Then how the car move?
Can someone give me a short explaination about this?
I need this script for my script Ninja Life.
Thanks before, sorry if i had bad english.

old Re: About car lua

MikuAuahDark
User Off Offline

Quote
Most car LUA uses this function:
cs2d lua cmd player
cs2d lua cmd image
cs2d lua cmd imagepos
cs2d lua cmd freeimage
math.abs
math.rad
math.sin
math.cos


Car LUA also uses this hook
cs2d lua hook ms100(or always)
cs2d lua hook always(or ms100)
cs2d lua hook serveracton

To make the car move, you need to set the player position then the image or otherwise. That car needs to move in cs2d lua hook ms100 or cs2d lua hook always hook. To spawn it, you may need to use cs2d lua hook serveraction and/or cs2d lua cmd menu. math.cos,sin,rad,abs are used to control where the car should move depending by cs2d lua cmd player(id,"rot"). Image category(image,freeimage,etc.) is used for the view of the car.

old Re: About car lua

ReVoltage
User Off Offline

Quote
Can you give me the part of script which make the car image moving for example? I dont understand at that part

old Re: About car lua

Avo
User Off Offline

Quote
It's not exactly true what user MikuAuahDark said. Script using so many function would waste much memory. Most of car mods use cs2d lua cmd image with certain modes:
More >

old Re: About car lua

ReVoltage
User Off Offline

Quote
Nevermind, solved by my self already.
I use wallhack lua instead of car lua
Thanks for helping
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview