AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Trying to supply players with weapon_gauss from HL (https://forums.alliedmods.net/showthread.php?t=16836)

MistaGee 08-21-2005 07:44

Trying to supply players with weapon_gauss from HL
 
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 :P, 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

Twilight Suzuka 08-21-2005 13:31

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.

MistaGee 08-22-2005 08:25

yikes... I'm a total n00b at entity programming, so I think I can forget about it... :cry:


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

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