Raised This Month: $32 Target: $400
 8% 

Which events changes money of player in CS: S?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-09-2007 , 06:49   Which events changes money of player in CS: S?
Reply With Quote #1

I want to catch all events that changes a players money. I need everything which changes money. Now I catch these:
Code:
round_start
player_death
hostage_follows
hostage_hurt
hostage_killed
hostage_rescued
Is there anything else? I don't know how to catch round start players get money when a round starts too.

Here is a list of other events:
Code:
player_hurt
bomb_beginplant
bomb_abortplant
bomb_planted
bomb_defused
bomb_exploded
bomb_dropped
bomb_pickup
bomb_begindefuse
bomb_abortdefuse
hostage_stops_following
hostage_rescued_all
hostage_call_for_help
vip_escaped
vip_killed
player_radio
bomb_beep
weapon_fire
weapon_fire_on_empty
weapon_reload
weapon_zoom
item_pickup
grenade_bounce
hegrenade_detonate
flashbang_detonate
smokegrenade_detonate
bullet_impact
player_footstep
player_jump
player_blind
player_falldamage
door_moving
round_freeze_end
nav_blocked
nav_generate
__________________

Last edited by Shaman; 07-09-2007 at 07:45.
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-09-2007 , 07:31   Re: Which events changes money of player in CS: S?
Reply With Quote #2

http://wiki.alliedmods.net/Generic_Source_Events

http://wiki.alliedmods.net/Generic_S...ts#round_start
__________________
I'm a blast from the past!
ferret is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-09-2007 , 07:45   Re: Which events changes money of player in CS: S?
Reply With Quote #3

Thanks for "round_start". I added it too.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-09-2007 , 08:06   Re: Which events changes money of player in CS: S?
Reply With Quote #4

Remember that hostage_follows only give money on the first touch.

Also, these MIGHT:
bomb_planted
bomb_defused

I can't remember. defused definately gives 3 frags.
__________________
I'm a blast from the past!
ferret is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-09-2007 , 13:07   Re: Which events changes money of player in CS: S?
Reply With Quote #5

How does CS: S store the money data? Maybe there is a way to detect changes to that data and then I can fire my "money_changed" event.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-09-2007 , 13:11   Re: Which events changes money of player in CS: S?
Reply With Quote #6

m_iAccount or something. See my smcash plugin.
__________________
I'm a blast from the past!
ferret is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-09-2007 , 13:28   Re: Which events changes money of player in CS: S?
Reply With Quote #7

I use that too. What is it? An integer, a string? How can I hook it?!?
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-09-2007 , 13:33   Re: Which events changes money of player in CS: S?
Reply With Quote #8

It's an unsigned short (16-bit integer). I don't think you can hook it for changes. It ranges from 0 to 65536. CSS will automatically change it to 16K if higher than 16K on round_start.
__________________
I'm a blast from the past!
ferret is offline
sumguy14
Senior Member
Join Date: Apr 2006
Old 07-09-2007 , 13:36   Re: Which events changes money of player in CS: S?
Reply With Quote #9

Code:
MoneyOffset=FindSendPropOffs("CCSPlayer", "m_iAccount");


Just define MoneyOffset at the top of the file, to get set money:

Code:
SetEntData(client,MoneyOffset,0-16000,4,true);
Code:
new playercash=GetEntDataEnt(client,MoneyOffset);
// playercash = Amount of money
sumguy14 is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-09-2007 , 13:37   Re: Which events changes money of player in CS: S?
Reply With Quote #10

What I want to do is create a bank system in my plugin. It will transfer the money to the bank if player has more than 10k, but I have to do this dynamicly.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
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 14:57.


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