AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Finding Spawns (https://forums.alliedmods.net/showthread.php?t=10862)

Votorx 03-03-2005 11:48

Finding Spawns
 
*Sigh* I remember a while back I had a problem with this. I figured out how to do it and incorporated it into my plugin and it worked. Of course, I need to do it again for another plugin I'm making only I forgot how to do it, I can't find my old plugin where I did it and I can't find anything to help me here on the forums so...

Does anyone know how I can get the origin of all the spawns for both the ct and t team? I've used find_ent_classname(blada) but its returning origins that are obviously not right (like x = 10039294 y = 92938481 z = 91029342), how can I do it correctly?

twistedeuphoria 03-03-2005 12:17

Did you try "info_player_start" and "info_player_deathmatch"?

Votorx 03-03-2005 21:16

Yeah

slurpycof 03-03-2005 23:05

I found this code somewhere on the these forums (sorry, don't remember who to credit). Part of it may help you.

Code:
 public plugin_precache() {     precache_model("models/w_suit.mdl")     return PLUGIN_CONTINUE  }  public tspawn_test(id, level, cid) {     new entid, Float:Ang[3], Float:Vec[3], Float:vAng[3]     new tEnt, tfEnt     new i=0     tEnt = find_ent_by_class(-1, "info_player_deathmatch")     while (tEnt > 0) {         tfEnt = find_ent_by_class(tEnt, "info_player_deathmatch")         entity_get_vector(tEnt, EV_VEC_angles, Ang)         entity_get_vector(tEnt, EV_VEC_origin, Vec)         entity_get_vector(tEnt, EV_VEC_v_angle, vAng)         entid = create_entity("info_target")         entity_set_string(entid, EV_SZ_classname, "view_spawn")         entity_set_model(entid, "models/w_suit.mdl")         entity_set_origin(entid, Vec)         entity_set_vector(entid, EV_VEC_angles, Ang)         entity_set_vector(entid, EV_VEC_v_angle, vAng)         entity_set_int(entid, EV_INT_solid, 1)         entity_set_int(entid, EV_INT_movetype, 6)         tEnt = tfEnt         i++     }     return PLUGIN_CONTINUE  }

Zor 03-04-2005 11:00

If you want to find spawn points download ripent.exe, and rip all the entities out of given map and look at the spawn points.

Cheers!

Votorx 03-04-2005 11:50

Yeah that would be an easier way of doing it but that's not how I want my plugin to operate.

is find_ent_class() the best way of finding the spawns or is there an easier way?


All times are GMT -4. The time now is 14:00.

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