Raised This Month: $ Target: $400
 0% 

Coordinates Of CT / T Spawns?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PIE
Senior Member
Join Date: Nov 2004
Location: California
Old 09-11-2005 , 22:45   Coordinates Of CT / T Spawns?
Reply With Quote #1

How do I find the Coordinates of the ct / t spawns using this:

Code:
#include <amxmodx>
#include <engine>
#include <fun>


#define PLUGIN "Capture The Snark"
#define VERSION "1.0"
#define AUTHOR "PIE"

public plugin_init() {
	register_srvcmd("amx_cts","snark",ADMIN_LEVEL_H,"Enables Capture  The Snark")
	register_concmd("amx_cts","snark",ADMIN_LEVEL_H,"Enables Capture  The Snark")
	register_plugin("Capture The Snark", "1.00", "PIE")
	register_cvar("sv_cts","d")
	register_clcmd("amx_cts", "snark");
	
}

public plugin_precache(){
	
	precache_model("models/w_squeak.mdl")
	precache_model("models/v_squeak.mdl")
	precache_model("models/p_squeak.mdl")
	precache_model("models/p_gauss.mdl")
}

public snark(id)
	{
	
	set_hudmessage(85, 42, 255, -1.0, -1.0, 0, 6.0, 12.0)
	show_hudmessage(id, " Bring The Other Team's Snark To Your Spawn!")
	
	new Float:origin[3]
	
	entity_get_vector(id,EV_VEC_origin,origin)
	
	new ent = create_entity("info_target")
	give_weapon(ent)
	
	entity_set_origin(ent,origin);
	origin[2] += 300.0
	entity_set_origin(id,origin)
	
	entity_set_float(ent,EV_FL_takedamage,0.0)
	entity_set_float(ent,EV_FL_health,100.0)
	entity_set_float(ent,EV_FL_gravity,300.0)
	
	entity_set_string(ent,EV_SZ_classname,"npc_snark");
	entity_set_model(ent,"models/p_squeak.mdl");
	entity_set_int(ent,EV_INT_solid, 2)
	
	entity_set_byte(ent,EV_BYTE_controller1,125);
	entity_set_byte(ent,EV_BYTE_controller2,125);
	entity_set_byte(ent,EV_BYTE_controller3,125);
	entity_set_byte(ent,EV_BYTE_controller4,125);
	
	new Float:maxs[3] = {16.0,16.0,36.0}
	new Float:mins[3] = {-16.0,-16.0,-36.0}
	entity_set_size(ent,mins,maxs)
	
	entity_set_float(ent,EV_FL_animtime,2.0)
	entity_set_float(ent,EV_FL_framerate,1.0)
	entity_set_int(ent,EV_INT_sequence,0);
	
	entity_set_float(ent,EV_FL_nextthink,halflife_time() + 0.01)
	
	drop_to_floor(ent)
	return 1;
}

public give_weapon(ent)
	{
	new entWeapon = create_entity("info_target")
	
	entity_set_string(entWeapon, EV_SZ_classname, "npc_weapon")
	
	entity_set_int(entWeapon, EV_INT_movetype, MOVETYPE_FOLLOW)
	entity_set_int(entWeapon, EV_INT_solid, SOLID_NOT)
	entity_set_edict(entWeapon, EV_ENT_aiment, ent)
	entity_set_model(entWeapon, "models/p_squeak.mdl")
}
tnx
__________________
My First Plugin...
http://www.immortalgamers.com/
Good Servers Good Ping Good People

The Christmas Goblins Ate My Sig *Sob*
PIE is offline
Send a message via AIM to PIE
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-12-2005 , 17:47  
Reply With Quote #2

T spawn:

Code:
new ent = find_ent_by_class(0,"info_player_deathmatch"); new Float:origin[3]; entity_get_vector(ent,EV_VEC_origin,origin);

CT spawn:


Code:
new ent = find_ent_by_class(0,"info_player_start"); new Float:origin[3]; entity_get_vector(ent,EV_VEC_origin,origin);
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 14:18.


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