01.11.2015, 01:27
Quote:
Hello. What good is this ?:
pawn Код:
|
pawn Код:
// Let's say we have a file that contains
// HouseInt, HousePrice, HouseOutsideX, HouseOutsideY, HouseOutsideZ
// The string looks like this when we get it back; "0|50000|23.0000|123.0000|1.0000"
// We can use the quiet function of sscanf to only get what we currently want (for whatever reason)
new Float:X,Float:Y,Float:Z;
sscanf(file_string, "p<|>{i}{i}fff", X,Y,Z);
// Now our X Y Z variables will be set to the proper values.
// Let's say we wanted to load the pickups or CPs for entering the house
// in a different function than where we set the textlabels data.
// That would be one use of this function