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

bonus money on every spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 04-08-2019 , 10:05   bonus money on every spawn
Reply With Quote #1

Hey, could anyone help me script a plugin where admin flat t receives bonus money $2000 on every spawn? Thanks
HowToRuski is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 04-08-2019 , 10:21   Re: bonus money on every spawn
Reply With Quote #2

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

public register_plugin_init()
{
    
//
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}

public 
fwHamPlayerSpawnPost(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
cs_set_user_money(id,cs_get_user_money(id) + 2000, .flash 1)
    }

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 04-08-2019 , 12:23   Re: bonus money on every spawn
Reply With Quote #3

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

public register_plugin_init()
{
    
//
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}

public 
fwHamPlayerSpawnPost(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
cs_set_user_money(id,cs_get_user_money(id) + 2000, .flash 1)
    }

Thanks, but what if i want it after the first round to start giving player $2000 on each round?
HowToRuski is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 04-08-2019 , 12:34   Re: bonus money on every spawn
Reply With Quote #4

Change the cvar "round" to change the round that will start to give the money.

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

new g_roundsround

public register_plugin_init()
{
    
round register_cvar("amx_rounds_money","2"
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
    
register_logevent("EventEndRnd"2"1=Round_End")
    
register_event("TextMsg""RoundRestart""a""2=#Game_will_restart_in"
}

public 
fwHamPlayerSpawnPost(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H && g_rounds >= get_pcvar_num(round))
    {
        
cs_set_user_money(id,cs_get_user_money(id) + 2000, .flash 1)
    }
}

public 
RoundRestart() g_rounds 0

public EventEndRnd() g_rounds++ 
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 04-09-2019 at 22:41.
iceeedr is offline
Send a message via Skype™ to iceeedr
Reply



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 19:06.


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