Vehicle Create MYSQL
#1

Код:
new  Float:x, Float:y, Float:z, Float:a;
					new string[80] , model, count;
					
					GetPlayerPos(playerid, x,y,z);
                    GetPlayerFacingAngle(playerid, a);
                    
                    vData[count][vehModel] 	= 	model;

                    model = strval(inputtext);

					format(string, sizeof(string), "Jбrmű elkйszнtve! Model: %d", model);
					SendClientMessage(playerid, -1, string);

					new query[2000];


				   	vData[count][vehID] 	= 	count;
				   	vData[count][vehModel] 	= 	model;

					mysql_format(mysql, query, sizeof(query), "INSERT INTO `vehicle` (`model`, `posX`, `posY`, `posZ`, `posA`) VALUES ('%d', '%f', '%f', '%f', '%f')", model, x, y, z, a);

                    mysql_tquery(mysql, query);

     				count ++;
WHat's the problem?
Vehicle X,Y,Z random... WHY??
Reply
#2

Hello.

Maybe you shouldn't use GetPlayerPos but GetVehiclePos.
But what exactly is the problem? Is the X,Y,Z random or what should it mean?
Quote:

Vehicle X,Y,Z random... WHY??

Tip: Please explain in future what exactly the problem is.
Reply
#3

So... I Created a NEW CAR and the position random save, but I need my position... where I create a new car
Sorry my bad english
Reply
#4

Quote:
Originally Posted by kexy96
Посмотреть сообщение
Sorry my bad english
No problem. My english is not better.

Why do you know that the position is random? Do you checked this? How?
Reply
#5



I Create a car... and save mysql but Position is random...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)