Post the code to see how are you trying.
EDIT: Try this:
PHP Code:
/* Mod Template generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Unknown"
/* Initialization */
#define RESPAWN_TIME 5.0
#define RESPAWN_ID 48575
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHam(Ham_Respawn, "weapon_shotgun", "respawn_hook");
RegisterHam(Ham_Touch, "weapon_shotgun", "touch_hook", 1); //post
}
public touch_hook(id, other)
{
//weapon is picked up, assumed it dissapeared from the world
//we set a task to respawn it
set_task(RESPAWN_TIME, "respawn_task", RESPAWN_ID+id);
}
public respawn_hook(id)
{
// prevent natural respawn
return HAM_SUPERCEDE;
}
public respawn_task(tid)
{
new id = tid - RESPAWN_ID;
ExecuteHam(Ham_Respawn, id);
}
Untested. Done extremely quick.
__________________