Using TSFUN:
Code:
#include <amxmodx>
#include <hamsandwich>
#include <tsfun>
new g_iSuperJump[32]
public plugin_init()
{
register_plugin("Permanent Superjump", "1.0", "Spunky")
RegisterHam(Ham_Spawn, "player", "fnSpawn", 0)
}
public fnSpawn(id)
{
new const iIndex = id - 1
g_iSuperJump[iIndex] = ts_createpwup(TSPWUP_SUPERJUMP)
ts_givepwup(id, g_iSuperJump[iIndex])
return HAM_HANDLED
}
With this, whenever someone joins, before they even get in the game, I get a runtime error and my server crashes. The error says that the player isn't in game yet.