Raised This Month: $ Target: $400
 0% 

How could I get user money?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xum
Member
Join Date: Jun 2006
Old 07-10-2006 , 20:17   How could I get user money?
Reply With Quote #1

I want to see how much $ an user has, but i haven't found get_user_money. I think it's a very simple question, but i don't know the answer
__________________
[IMG]http://img236.**************/img236/9858/xulogo2pq.gif[/IMG]Xu Share Website CjtServer
My Superhero 22/7 gameserver
ip: 64.94.171.241:27055 and the pasword is: qwerty
Xum is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-10-2006 , 20:18   Re: How could I get user money?
Reply With Quote #2

Code:
cs_get_user_money(id)
make sure to
Code:
#include <cstrike>
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-10-2006 , 20:29   Re: How could I get user money?
Reply With Quote #3

If you need help finding a function try using
http://www.amxmodx.org/funcwiki.php
Shurik3n is offline
Xum
Member
Join Date: Jun 2006
Old 07-10-2006 , 20:41   Re: How could I get user money?
Reply With Quote #4

lol, was so simple . Thx again Rolnaaba .
__________________
[IMG]http://img236.**************/img236/9858/xulogo2pq.gif[/IMG]Xu Share Website CjtServer
My Superhero 22/7 gameserver
ip: 64.94.171.241:27055 and the pasword is: qwerty
Xum is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-10-2006 , 20:42   Re: How could I get user money?
Reply With Quote #5

anytime
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Xum
Member
Join Date: Jun 2006
Old 07-10-2006 , 21:09   Re: How could I get user money?
Reply With Quote #6

And how can i remove some moneys from an user?
Code:
public plugin_init() {     register_plugin("Test", "0.1", "Xum")     register_cvar("armor_cost", "12000")     register_clcmd("say /test","cmd_test") } public cmd_test { get_user_armor(id) + 75 cs_get_user_money(id) -= get_cvar_num("armor_cost") }


Another easy thing i don't know how to fix . Damn i'm a noob (
__________________
[IMG]http://img236.**************/img236/9858/xulogo2pq.gif[/IMG]Xu Share Website CjtServer
My Superhero 22/7 gameserver
ip: 64.94.171.241:27055 and the pasword is: qwerty
Xum is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-10-2006 , 21:11   Re: How could I get user money?
Reply With Quote #7

to remove money:
Code:
cs_set_user_money(id,cs_get_user_money(id) - get_cvar_num("armor_cost"))
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 07-10-2006 at 21:13.
Rolnaaba is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-10-2006 , 21:43   Re: How could I get user money?
Reply With Quote #8

Code:
new money = cs_get_user_money(id) - get_cvar_num("armor_cost"); if(money < 1) {   // they can't afford it } else {   // they can afford it   cs_set_user_money(id , money , 1); // the last param. makes it flash if set to 1 }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.

Last edited by v3x; 07-11-2006 at 03:56.
v3x is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 07-10-2006 , 23:48   Re: How could I get user money?
Reply With Quote #9

Your code requires that a user have at least $1 over the price of an item to purchase it. If I have $100, why can't I buy an $100 item? ;)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 07-11-2006 , 17:37   Re: How could I get user money?
Reply With Quote #10

ooooo rejected

EDIT: ZOMG ALL HAIL TEH GABEN KINGZORZ, THE GHW SITE SEEMS LIKE IT IS UP!!!!!!!!!!!!!!!!11111111111oneoneoneoneoneo ne.

REEDIT 10 seconds later: AHHHHHH, v3x, you gotta get our hopes up by changing your sig and keeping the website in giant sized font.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.

Last edited by Lord_Destros; 07-11-2006 at 17:39.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
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 08:02.


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