AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to check if player has x amount of cash? (https://forums.alliedmods.net/showthread.php?t=246236)

danonix 08-14-2014 05:25

How to check if player has x amount of cash?
 
Hello,

How can I check if player has in this moment x amount of cash? Other methods than set_task for player?

Thanks

Flick3rR 08-14-2014 05:26

Re: How to check if player has x amount of cash?
 
cs_get_user_money(id) ?

HamletEagle 08-14-2014 05:58

Re: How to check if player has x amount of cash?
 
First, decide when you want to check this. After that use cs_get_user_money( index ).

Jhob94 08-14-2014 06:11

Re: How to check if player has x amount of cash?
 
Quote:

Originally Posted by HamletEagle (Post 2183803)
First, decide when you want to check this. After that use cs_get_user_money( index ).

I guess he is looking for some event that detects when user's money has changed.
I am not sure, but i think that event doesn't exists.

danonix 08-14-2014 06:57

Re: How to check if player has x amount of cash?
 
Exactly @Jhob94. So it is only possible to do this stuff through task? I want to some stuff right after reaching by x player y amount of gold.

mottzi 08-14-2014 07:09

Re: How to check if player has x amount of cash?
 
PHP Code:

register_event("Money""eventMoney""be"


danonix 08-14-2014 07:30

Re: How to check if player has x amount of cash?
 
Thanks. What is read_data (1) in this event?

mottzi 08-14-2014 14:54

Re: How to check if player has x amount of cash?
 
https://wiki.alliedmods.net/Half-lif...e_events#Money


All times are GMT -4. The time now is 12:54.

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