Raised This Month: $ Target: $400
 0% 

Spawnmoney jctf


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
yagami
Senior Member
Join Date: Jan 2021
Old 06-11-2022 , 17:49   Spawnmoney jctf
Reply With Quote #1

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(idclamp(iStartMoneyget_pcvar_num(pCvar_mp_startmoney), 16000));
    
    }
    else if(
g_bSuicide[id])
    {
        
g_bSuicide[id] = false

        player_print
(idid"%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(idclamp((iStartMoney get_pcvar_num(pCvar_ctf_spawnmoney)), get_pcvar_num(pCvar_mp_startmoney), 16000))
      }        

yagami is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode