Raised This Month: $51 Target: $400
 12% 

Create a entity and save it.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fireattack
Senior Member
Join Date: Jul 2008
Old 08-15-2010 , 11:44   Create a entity and save it.
Reply With Quote #1

PHP Code:
new aimVector[3]
public 
plugin_init() 
{
 
register_plugin(PLUGINVERSIONAUTHOR);
 
register_concmd"amx_entity""createaentity");
}
public 
createaentity (id)
{
 new 
LoL create_entity"info_target" );
 new 
Float:fOrigin[3];
 {
  
entity_set_modelLoL"models/themodel.mdl"); 
  
get_user_origin(idaimVector3);
  
IVecFVec(aimVectorfOrigin);
  {
   
set_pevLoLpev_classname"AnEntity" );;
   
set_pevLoLpev_solid    SOLID_BBOX  );
  }
 }

Well, with the entity spawned, how i can save it by nvault?
fireattack is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-15-2010 , 11:46   Re: Create a entity and save it.
Reply With Quote #2

Saving an entity in nvault ? It doesn't make sense. What do you want to do exactly ?
__________________
Arkshine is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 08-15-2010 , 11:50   Re: Create a entity and save it.
Reply With Quote #3

When you spawn the entity, the entity keep saved if you change the map or make a restart.
fireattack is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-15-2010 , 19:06   Re: Create a entity and save it.
Reply With Quote #4

You can't save actual entities, they also are not transfered from map to map, they're all deleted and respawned in the new map... you must spawn them using a plugin and you can load from a file, sql or nvault some variable data... like it's origin in the map.
__________________

Last edited by Hunter-Digital; 08-15-2010 at 19:08.
Hunter-Digital is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 08-15-2010 , 19:23   Re: Create a entity and save it.
Reply With Quote #5

You can save the origins in a .txt and when the plugin starts you ask for the origins in that file. If exists, spawn it.
Mxnn is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 08-16-2010 , 13:28   Re: Create a entity and save it.
Reply With Quote #6

Quote:
Originally Posted by Mxnn View Post
You can save the origins in a .txt and when the plugin starts you ask for the origins in that file. If exists, spawn it.
Nice idea, I'll try.
fireattack is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-16-2010 , 23:39   Re: Create a entity and save it.
Reply With Quote #7

Quote:
Originally Posted by Mxnn View Post
You can save the origins in a .txt and when the plugin starts you ask for the origins in that file. If exists, spawn it.
That's what I said...
Quote:
Originally Posted by Hunter-Digital View Post
You can't save actual entities, they also are not transfered from map to map, they're all deleted and respawned in the new map... you must spawn them using a plugin and you can load from a file, sql or nvault some variable data... like it's origin in the map.
__________________
Hunter-Digital is offline
Reply



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 02:08.


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