Raised This Month: $ Target: $400
 0% 

entitys help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2005 , 12:01   entitys help
Reply With Quote #1

Ok... I want to make 24 entitys with a model that spawn at random places each round, and I don't want to make files for spawns like csdm...
so maby if you can do it like random spawns and that they still are on the map ( if possible ) or else maby drom them from the sky... i know NOTHING bout entitys... plz help
[ --<-@ ] Black Rose is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2005 , 17:12  
Reply With Quote #2

c'mon... i need this
[ --<-@ ] Black Rose is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-04-2005 , 17:26  
Reply With Quote #3

Not that great at this either, but try this:

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("w/e","w/e","w/e");         set_task(5.0,"do_stuff"); } public do_stuff() {     for(new i = 0;i <= 24;i++)     {         new Float:origin[3];         origin[0] = random_float(0.0,1000.0);         origin[1] = random_float(0.0,1000.0);         origin[2] = random_float(0.0,1000.0);         new ent = create_entity("info_target");         entity_set_origin(ent,origin);         entity_set_string(ent,EV_SZ_model,"whatever_model");     } }

Of course, change some stuff. It'll crash if you load it as-is.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2005 , 17:42  
Reply With Quote #4

thx hawk will try...
[ --<-@ ] Black Rose is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2005 , 18:43  
Reply With Quote #5

well... didnt spawn anything...
what is "info_target"? should i replace that?
i used an player mdl... don't think would make a difference.. but i dunno so does it?
[ --<-@ ] Black Rose is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-04-2005 , 18:52  
Reply With Quote #6

It probably did spawn them, you just didn't see them. By default, info_target would be invisible. That's one of the things you should have changed, the classname, although it really doesn't matter.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2005 , 19:07  
Reply With Quote #7

okay okay... so how do you make em visible?
Code:
#include <amxmodx> #include <engine> public plugin_init()     {     register_plugin("w/e","w/e","w/e");     set_task(5.0,"do_stuff"); } public plugin_precache() {     precache_model("models/player/santa/santa.mdl") } public do_stuff() {     for(new i = 0;i <= 24;i++)         {         new Float:origin[3];         origin[0] = random_float(0.0,1000.0);         origin[1] = random_float(0.0,1000.0);         origin[2] = random_float(0.0,1000.0);         new ent = create_entity("info_target");         entity_set_origin(ent,origin);         entity_set_string(ent,EV_SZ_model,"santa");     } }
[ --<-@ ] Black Rose is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-04-2005 , 19:09  
Reply With Quote #8

Code:
entity_set_string(ent,EV_SZ_model,"santa");

Well that's your problem right there.

Set it to "player/santa/santa.mdl" and try again
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2005 , 19:20  
Reply With Quote #9

ok thx...
[ --<-@ ] Black Rose is offline
.slimE
Member
Join Date: Oct 2005
Old 11-04-2005 , 19:45  
Reply With Quote #10

n1 black rose
__________________
Yeah FaWk
.slimE 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 23:42.


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