From 34f12e76c4613b68264e38334fd0c78ced479480 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Sun, 13 Nov 2005 22:21:15 +0000 Subject: [PATCH] added request at20855 --- plugins/include/tsx.inc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; +}