Good night I'll try to explain as best I can I'm using JCTF by Digi plugin
in it I made a config like this
Admin starts with 3000 and players with 2000
Code:
pCvar_adm_startmoney = MONEY ADMIN
pCvar_mp_startmoney = MONEY PLAYER
when ADMIN/PLAYER dies without spending anything he comes back with money that was set for him + BONUS SPAWNMONEY but this is not happening
PHP Code:
if(g_bFirstSpawn[id] || g_bRestarted[id])
{
g_bRestarted[id] = false
g_bFirstSpawn[id] = false
new iStartMoney = (is_user_admin(id) ? get_pcvar_num(pCvar_adm_startmoney) : get_pcvar_num(pCvar_mp_startmoney));
if (cs_get_user_money(id) < iStartMoney)
cs_set_user_money(id, clamp(iStartMoney, get_pcvar_num(pCvar_mp_startmoney), 16000));
}
else if(g_bSuicide[id])
{
g_bSuicide[id] = false
player_print(id, id, "%L", id, "SPAWN_NOMONEY")
}
else
{
// SHOULD NOT THE SPAWN MONEY BONUS HERE?
new iStartMoney = (is_user_admin(id) ? get_pcvar_num(pCvar_adm_startmoney) : get_pcvar_num(pCvar_mp_startmoney));
if (cs_get_user_money(id) < iStartMoney)
cs_set_user_money(id, clamp((iStartMoney + get_pcvar_num(pCvar_ctf_spawnmoney)), get_pcvar_num(pCvar_mp_startmoney), 16000))
}
}