SA-MP Forums Archive
3 things. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 3 things. (/showthread.php?tid=243599)



3 things. - Rokzlive - 23.03.2011

Ok, first, whats wrong with this sql query? It errors on the server even though it compiles fine.

pawn Код:
format(query, sizeof(query), "INSERT INTO `ownedcars` (`Model`, `Color1`, `Color2`, `Price`, `Owner`, `PosX`, `PosY`, `PosZ`, `PosA`, `Plate`) VALUES ('402', '0', '0', '0', '%s', '-1969.9641', '262.6344', '35.0036', '1.6208', '%s'));", pname, pname);
                mysql_query(query);
And

When people get out of a car on my server, the car respawns like 15 sec after they get out. How do i change that?

And

When a person dies in a car how do i make it auto respawn.


AW: 3 things. - Pablo Borsellino - 23.03.2011

1.) Show us your Error.. ?!

2.) Show us your CreateVehicle/AddStaticVehicle Code or change the last number (15) to -1 (Never respawns) or 30 (30 Seconds) or what ever.

3.) OnPlayerDeath:
pawn Код:
if(IsPlayerInAnyVehicle(playerid))SetVehicleToRespawn(GetPlayerVehicleID(playerid));



Re: 3 things. - Rokzlive - 23.03.2011

[15:52:35] [MySQL] Error (0): Failed to exeute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1.