AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   VIP Money Bonus on first round (https://forums.alliedmods.net/showthread.php?t=314346)

HowToRuski 02-15-2019 08:50

VIP Money Bonus on first round
 
Hi, is there any plugin where you can get money bonus not $800 but $1000 on the first round for vips?

Celena Luna 02-15-2019 10:12

Re: VIP Money Bonus on first round
 
Which flags?

HowToRuski 02-15-2019 10:14

Re: VIP Money Bonus on first round
 
Quote:

Originally Posted by celena luna (Post 2639726)
which flags?

admin_level_h

Celena Luna 02-15-2019 11:56

Re: VIP Money Bonus on first round
 
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)



HowToRuski 02-15-2019 12:17

Re: VIP Money Bonus on first round
 
Quote:

Originally Posted by Celena Luna (Post 2639737)
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! :)

Celena Luna 02-15-2019 14:01

Re: VIP Money Bonus on first round
 
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    




All times are GMT -4. The time now is 18:40.

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