diff --git a/plugins/include/tsx.inc b/plugins/include/tsx.inc index 385058bb..d49fc266 100755 --- a/plugins/include/tsx.inc +++ b/plugins/include/tsx.inc @@ -58,4 +58,19 @@ native xmod_get_stats_size(); /* Returns 1 if true */ native xmod_is_custom_wpn(wpnindex); -/************* Shared Natives End ********************************/ \ No newline at end of file +/************* Shared Natives End ********************************/ + +/* Spawns a Weapon */ +stock ts_weaponspawn(weaponid[], duration[], extraclip[], spawnflags[], Float:Origin[3]) +{ + new ent = create_entity("ts_groundweapon"); + + DispatchKeyValue(ent, "tsweaponid", weaponid); + DispatchKeyValue(ent, "wduration", duration); + DispatchKeyValue(ent, "wextraclip", extraclip); + DispatchKeyValue(ent, "spawnflags", spawnflags); + DispatchSpawn(ent); + + entity_set_origin(ent, Origin); + return PLUGIN_HANDLED; +}