How can i do this?
#1

How can i do this?

Explanation:
In my MySQL table i have these:



VehName
XCoord
YCoord
ZCoord
Angle


Veh1
Veh2
Veh3
Veh4
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0000
0.0000
0.0000
0.0000



Theres models aswell but that was just a quick example, Anyways:

How would i get those coordinates and create the vehicles using them coords?
Reply
#2

Look over the basics of MySQL.
Just select the information and see what it returns, then load it into variables to set up in the function.
Reply
#3

Quote:
Originally Posted by Grim_
Look over the basics of MySQL.
Just select the information and see what it returns, then load it into variables to set up in the function.
Yeye this bit isent really to do with MySQL.
I dont know how to create 4 vehicles with those 4 rows of coords
Or if someone adds lets say 4/5 more rows of coords and models
Then for it to create 8 vehicles
Reply
#4

Anyone?
Reply
#5

You retrieve data from your table with SQL statements. Learn them and check the topic of your mqsql plugin to see how to query the db to get the data from your table. Then just parse the string with something like sscanf to get the name and floats
Reply
#6

Quote:
Originally Posted by dice7
You retrieve data from your table with SQL statements. Learn them and check the topic of your mqsql plugin to see how to query the db to get the data from your table
I know how to get all the information,
I just dont know how to create the vehicles,
So like if i had 4 rows of coords, it would create 4 vehicles using them coords,
If i had 7 rows, then 7 vehicles
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)