Mathematical functions?
#1

I got a little mathematical question:
Is it possible to make a math function to be used in samp?

Example: f(x) = X^2
In wich f(x) represents fe: the z position of a vehicle
And the x represents the time?
Reply
#2

What do you mean exactly?? I know that you can make a calculator ingame if thats what you meant.
Reply
#3

Hmmm u need a real life calculator and type the function
F(x)=x^2
If u look the Y stuff as the samp height and x stuff as ingame time u can create some awesome stuff...
The function x^2 would make a vehicle go very high in the air, then the vh would go down in an increasing speed until he reached point 0 tyen it goes back up for example...
Reply
#4

Well you can do simple math and use AND, OR etc....

You can also make functions....

So my initial guess would be absolutely, why not? .
Reply
#5

yeah use GetVehiclePos for the z value and gettime for time
Reply
#6

So it should be somethikg like this:

GetVehiclePos = timevalue^2
Setvehiclepos(result)
in wich timevaleu gets +1 every 500 ms f.e?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)