What u did it's not wrong u only mentioned bad function(it should be functioned that u mentioned in code)
HTML Code:
/*
;//Formatright © 2009, ConnorMcLeod
*/
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define VERSION "0.4.0"
new g_pCvarStartMoney
public plugin_init()
{
register_plugin("Min Spawn Money", VERSION, "ConnorMcLeod")
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
g_pCvarStartMoney = get_cvar_pointer("mp_startmoney")
}
public Player_Spawn(id)
{
if( is_user_alive(id) )
{
static iStartMoney
if( cs_get_user_money(id) < (iStartMoney = get_pcvar_num(g_pCvarStartMoney)) )
{
cs_set_user_money(id, iStartMoney, 1)
}
}
}
Like i mentioned before replace all yours to this or replace only one line. And try it again