Raised This Month: $ Target: $400
 0% 

diffrent origins from a file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-21-2009 , 09:47   Re: diffrent origins from a file
Reply With Quote #3

Quote:
Originally Posted by Dr.G View Post
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).
__________________
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode