Raised This Month: $12 Target: $400
 3% 

VIP Money Bonus on first round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 02-15-2019 , 08:50   VIP Money Bonus on first round
Reply With Quote #1

Hi, is there any plugin where you can get money bonus not $800 but $1000 on the first round for vips?
HowToRuski is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 02-15-2019 , 10:12   Re: VIP Money Bonus on first round
Reply With Quote #2

Which flags?
__________________
My plugin:
Celena Luna is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 02-15-2019 , 10:14   Re: VIP Money Bonus on first round
Reply With Quote #3

Quote:
Originally Posted by celena luna View Post
which flags?
admin_level_h
HowToRuski is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 02-15-2019 , 11:56   Re: VIP Money Bonus on first round
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN  "[VIP] Money Start"
#define VERSION "0.1"
#define AUTHOR  "Celena Luna"

new g_FirstRound

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w");
    
register_logevent("logevent_round_end"2"1=Round_End"

    
RegisterHam(Ham_Spawn"player""fw_Player_Spawn_Post"1)
    
g_FirstRound 1
}

public 
Event_TextMsg_Restart()
{
    
g_FirstRound 1
}

public 
logevent_round_end()
{
    
g_FirstRound 0
}

public 
fw_Player_Spawn_Post(id)
{
    if((
get_user_flags(id) & ADMIN_LEVEL_H) && g_FirstRound == 1)
        
cs_set_user_money(id1000)

__________________
My plugin:
Celena Luna is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 02-15-2019 , 12:17   Re: VIP Money Bonus on first round
Reply With Quote #5

Quote:
Originally Posted by Celena Luna View Post
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN  "[VIP] Money Start"
#define VERSION "0.1"
#define AUTHOR  "Celena Luna"

new g_FirstRound

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w");
    
register_logevent("logevent_round_end"2"1=Round_End"

    
RegisterHam(Ham_Spawn"player""fw_Player_Spawn_Post"1)
    
g_FirstRound 1
}

public 
Event_TextMsg_Restart()
{
    
g_FirstRound 1
}

public 
logevent_round_end()
{
    
g_FirstRound 0
}

public 
fw_Player_Spawn_Post(id)
{
    if((
get_user_flags(id) & ADMIN_LEVEL_H) && g_FirstRound == 1)
        
cs_set_user_money(id1000)

but now can u help me make a plugin when admin_level_H gets $3000 every round except first one ?
p.s. thanx for this one, works great!

Last edited by HowToRuski; 02-15-2019 at 12:18.
HowToRuski is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 02-15-2019 , 14:01   Re: VIP Money Bonus on first round
Reply With Quote #6

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN  "[VIP] Money Start"
#define VERSION "0.1"
#define AUTHOR  "Celena Luna"

new g_FirstRoundg_iLastRoundMoney[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w");
    
register_logevent("logevent_round_end"2"1=Round_End"

    
RegisterHam(Ham_Spawn"player""fw_Player_Spawn_Post"1)
    
g_FirstRound 1
}

public 
Event_TextMsg_Restart()
{
    
g_FirstRound 1
}

public 
logevent_round_end()
{
    
g_FirstRound 0

    
new iPlayers[32] , iNum Player;
    
get_playersiPlayers iNum "h" );
    
    for ( new 
iNum i++ )
    {    
        
Player iPlayers[i];
        
g_iLastRoundMoney[Player] = cs_get_user_money(Player
    }
}

public 
fw_Player_Spawn_Post(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
        
set_task(0.1"SetMoney"id//Set bit delay to replace the default bonus Win/Lose
}

public 
SetMoney(id)
{
    if(
g_FirstRound == 1)
        
cs_set_user_money(id1000//For the first round
    
else 
        
cs_set_user_money(idg_iLastRoundMoney[id]+3000//Second round onward    

__________________
My plugin:

Last edited by Celena Luna; 02-15-2019 at 14:02.
Celena Luna is offline
Reply


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 10:44.


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