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
csykosoma
Member
Join Date: Dec 2011
Old 06-27-2018 , 01:17   Re: Will this work? Set money on round end plugin
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
You are hooking teams win incorrectly, use get_players then loop through players array indexes.
Is this what you mean? I'm having trouble understanding how to use get_players, this doesn't compile.

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

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


#define TIMETOWAIT 4.7



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()
{
    new 
players[32] , num;
    
get_players(playersnum "be""T")
    
    for (new 
1<= numi++)
        
cs_set_user_money(players(i), 800)    
    
    
}

public 
GiveCTmoney()
{
    new 
players[32] , num;
    
get_players(playersnum "be""CT")
    
    for (new 
1<= numi++)
        
cs_set_user_money(players(i), 800)    
    
    

csykosoma is offline
 



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