Raised This Month: $ Target: $400
 0% 

Converting TSX Spawn Weapon to Metamod


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Minimum
Senior Member
Join Date: Jun 2006
Old 01-27-2007 , 19:57   Converting TSX Spawn Weapon to Metamod
Reply With Quote #1

Alright, I am trying to convert TSX's ts_spawnweapon function to work with Metamod instead of Engine. I have ran into a problem though. When I execute this function nothing happens. No errors show up in the server console or anything. What could be the problem?

Code:
/*      Weapon Spawns */  stock ts_spawnweapon(weaponid[],duration[],extraclip[],spawnflags[],Float:Origin[3]) {     new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "ts_groundweapon"));     dllfunc(DLLFunc_Spawn, ent);     set_keyvalue(ent,"tsweaponid",weaponid);     set_keyvalue(ent,"wduration",duration);     set_keyvalue(ent,"wextraclip",extraclip);     set_keyvalue(ent,"spawnflags",spawnflags);     engfunc(EngFunc_SetOrigin, ent, Origin);     return PLUGIN_HANDLED; } /*      Set Keyvalue - Coded by Basic-Master */  stock set_keyvalue(ent, key[], value[]) {     new classname[32]     pev(ent, pev_classname, classname, 31)     set_kvd(0, KV_ClassName, classname)     set_kvd(0, KV_KeyName, key)     set_kvd(0, KV_Value, value)     set_kvd(0, KV_fHandled, 0)         dllfunc(DLLFunc_KeyValue, ent, 0) }

Last edited by Minimum; 01-27-2007 at 20:32.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
 



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 00:39.


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