format - 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: format (
/showthread.php?tid=272694)
format - Unknown123 - 29.07.2011
is there other way to format a varible?
i got this:
format(Vehicleinfo[vehicleid][owner], 24, pName);
but sometimes it return: W(name)
like: WUnknown123
Re: format -
Gazmull - 29.07.2011
The string length must be before VehicleInfo[vehicleid][owner]
Re: format - Unknown123 - 29.07.2011
so?
format(24, Vehicleinfo[vehicleid][owner], 24, pName);
Re: format - [L3th4l] - 29.07.2011
pawn Код:
format(Vehicleinfo[vehicleid][owner], 24, "%s", pName);
Re: format -
Calgon - 29.07.2011
You should avoid using format() to copy strings. A better way would be to use
strcat:
pawn Код:
strcat(Vehicleinfo[vehicleid][owner], pName, MAX_PLAYER_NAME);
Re: format - Unknown123 - 29.07.2011
Ok, thx for the replies and i got a base in the water, and the vehciles is falling through the objects, i have trid to put the vehicles higher up (Z + 10) but dont work good
Re: format - Unknown123 - 29.07.2011
also when im leaving that "base" and come back then i see the vehicles get spawned after the objects are loaded
(or steamed in or w/e) so how shold i do it?
Re: format - Unknown123 - 31.07.2011
bump, how should i do it? so the vehicles dont spawn in water? but on the objects...?