Raised This Month: $ Target: $400
 0% 

Trying to supply players with weapon_gauss from HL


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 08-21-2005 , 07:44   Trying to supply players with weapon_gauss from HL
Reply With Quote #1

Hi,

I'm trying to provide players with weapon_gauss from HL. This is how far I've come yet:
Code:
// Give weapon_gauss from HL // Idea from McDiddy's by superjer :p // Coding and testing so far by MistaGee // I altered the cmd_gauss function from csnadedrops.sma to spawn an armoury_entity. #include <amxmodx> #include <engine> public plugin_init(){     register_plugin("Gauss", "0.1 DEV", "MistaGee");     register_concmd("amx_gauss", "cmd_gauss", -1, " ");     } public plugin_precache(){     precache_model("models/p_gauss.mdl");     precache_model("models/w_gauss.mdl");     precache_model("models/v_gauss.mdl");     //precache_sound();     } public cmd_gauss(id, level, cid){     new ent_gauss = create_entity("armoury_entity"); // create gauss entity     entity_set_string(ent_gauss,EV_SZ_classname,"gaussentity"); // change name     entity_set_int(ent_gauss,EV_ENT_owner,id); // set owner     entity_set_int(ent_gauss,EV_INT_iuser1,0); // hasn't bounced yet         // set entity's size     new Float:minbox[3] = { -2.5, -2.5, -2.5 }     new Float:maxbox[3] = { 2.5, 2.5, 2.5 };     entity_set_vector(ent_gauss,EV_VEC_mins,minbox);     entity_set_vector(ent_gauss,EV_VEC_maxs,maxbox);         // set overall being of a whole     entity_set_int(ent_gauss,EV_INT_solid,SOLID_TRIGGER);     entity_set_int(ent_gauss,EV_INT_movetype,MOVETYPE_TOSS);         // set a random angle     new Float:angles[3] = { 0.0, 0.0, 0.0 };     angles[1] = float(random_num(0,180));     entity_set_vector(ent_gauss,EV_VEC_angles,angles);         // get player's origin     new Float:origin[3];     entity_get_vector(id,EV_VEC_origin,origin);     origin[0] += 20; // offset         // set model and origin     entity_set_model(ent_gauss,"models/w_gauss.mdl");     entity_set_vector(ent_gauss,EV_VEC_origin,origin);     return PLUGIN_HANDLED;     }

The script spawns an armoury_entity (at least, I think it does , the weapon shows up...) next to the player calling the command amx_gauss, but the player cannot pick the weapon up. After a few moments, CS seems to completely crash. I think I messed up something big...


You don't need to copy any skins at all since the CS engine seems to get them directly from valve directory.

Plz help me to finish the plugin, it would be really cute... Of course the weapon shall later on cost money, but I don't want to do this easy stuff unless the "main parts" don't work...


thx in advance,

Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 08-21-2005 , 13:31  
Reply With Quote #2

The Gauss Gun (or Tau Cannon as it is correctly refered to by VALVE, but for some reason they changed the name to Gauss for the SDK ~_~) is not coded in CS. Thus, you cannot give a player in CS, the Tau Cannon.

You've have to recode the entire Tau Cannon from scratch in AMXx.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 08-22-2005 , 08:25  
Reply With Quote #3

yikes... I'm a total n00b at entity programming, so I think I can forget about it...
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
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:31.


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