format
#1

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
Reply
#2

The string length must be before VehicleInfo[vehicleid][owner]
Reply
#3

so?

format(24, Vehicleinfo[vehicleid][owner], 24, pName);
Reply
#4

pawn Код:
format(Vehicleinfo[vehicleid][owner], 24, "%s", pName);
Reply
#5

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);
Reply
#6

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
Reply
#7

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?
Reply
#8

bump, how should i do it? so the vehicles dont spawn in water? but on the objects...?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)