Raised This Month: $ Target: $400
 0% 

[Solved] Saving entities


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 05-31-2009 , 12:15   [Solved] Saving entities
Reply With Quote #1

Lets say that we spawned a entity on a map, how can we save it to a file?
Could I do something like this?

PHP Code:
  new g_File[128];
 
  [...]
 
  new 
file fopen(g_File"wt");
  new 
szData[128];
  new 
Float:vOrigin[3];
 
  new 
classname[32];
  
pev(entpev_classnameclassname31);
 
  while((
ent engfunc(EngFunc_FindEntityByStringentclassname) != ))
  {
      
pev(entpev_originvOrigin);
 
      
formatex(szData128"%f %f %f^n"vOrigin[0], vOrigin[1], vOrigin[2]);
      
fputs(fileszData);
  } 
Yet, if that saves the origin, how can I retrieve the origin again and load it?
__________________
Achievements API - a simple way for you to create your OWN custom achievements!

Last edited by Xellath; 06-01-2009 at 11:23.
Xellath 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 13:51.


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