Quote:
Originally Posted by Dr.G
i need a way to pick out an origin from a file, and use it in set_user_origin(id, Origin), so it needs to be a diffrent origin/origin on the next line for every time. how do i do that? and are there a better way then set_user_origin?
cheers
|
These functions should take care of what you are trying to do. Use a for-loop to cycle from line 1->file_size.
file_size
http://www.amxmodx.org/funcwiki.php?go=func&id=91
read_file
http://www.amxmodx.org/funcwiki.php?go=func&id=87
Use fm_set_user_origin(id, fOrigin) to set a players origin and pev(id,pev_origin,fOrigin) to get an origin. new Float:fOrigin[3] is the type needed to get\set origins with fakemeta as it uses floats and not integers like get\set origin does.
Remember that before using the origin read from file, it must be converted to a float array containing the 3 origin coordinates (x,y,z).
__________________