Raised This Month: $ Target: $400
 0% 

Will this work? Set money on round end plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
csykosoma
Member
Join Date: Dec 2011
Old 06-26-2018 , 16:40   Will this work? Set money on round end plugin
Reply With Quote #1

Trying to make plugin that
checks on round end if(is the user is dead && is on the losing team && money is less than 800)
{
sets users money to 800
}

but it is giving a tag mismatch error during compiling on these two lines
Code:
if ((fm_get_user_team(i) == CS_TEAM_CT) && !is_user_alive(i) && (cs_get_user_money(i) < 800))
and I have no idea if I'm doing anything else wrong with this code.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>


#define TIMETOWAIT 4.7

#define fm_get_user_team(%1) get_pdata_int(%1, 114)


new g_iMaxPlayers

public plugin_init()
{
    
register_logevent("LogEvent_CTs_Win"6"0=Team""1=CT""3=CTs_Win")
    
register_logevent("LogEvent_Ts_Win"3"0=Team""1=CT""3=CTs_Win")
    
g_iMaxPlayers get_maxplayers()
}

public 
LogEvent_CTs_win()
{
    
set_task(TIMETOWAIT"GiveTmoney")
}

public 
LogEvent_Ts_win()
{
    
set_task(TIMETOWAIT"GiveCTmoney")
}

public 
GiveTmoney()
{
    for (new 
1<= g_iMaxPlayersi++)
    {
        if(!
is_user_connected(i))
            continue;
        
        if ((
fm_get_user_team(i) == CS_TEAM_T) && !is_user_alive(i) && (cs_get_user_money(i) < 800))
            
cs_set_user_money(i800)    
        
    }
}

public 
GiveCTmoney()
{
    for (new 
1<= g_iMaxPlayersi++)
    {
        if(!
is_user_connected(i))
            continue;
        
        if ((
fm_get_user_team(i) == CS_TEAM_CT) && !is_user_alive(i) && (cs_get_user_money(i) < 800))
            
cs_set_user_money(i800)    
        
    }

csykosoma 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 00:27.


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