Vehicle Create MYSQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Create MYSQL (
/showthread.php?tid=614183)
Vehicle Create MYSQL -
kexy96 - 05.08.2016
Код:
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??
Re: Vehicle Create MYSQL -
Mencent - 05.08.2016
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.
Re: Vehicle Create MYSQL -
kexy96 - 05.08.2016
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
Re: Vehicle Create MYSQL -
Mencent - 05.08.2016
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?
Re: Vehicle Create MYSQL -
kexy96 - 05.08.2016
I Create a car... and save mysql but Position is random...