Raised This Month: $ Target: $400
 0% 

get_user_frags, read_argv


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
tonykaram1993
Senior Member
Join Date: Mar 2013
Location: This World
Old 08-18-2013 , 13:16   Re: get_user_frags, read_argv
Reply With Quote #7

Yes what akcaliberg made is the correct way. The way you have done it like so
PHP Code:
case 12:
        {
            
ColorChat(id,RED,"^3[FUNSHOP]^4 You draw^3 swap frags with deaths^4"0)
            
cs_set_user_deaths(idget_user_frags(id) )
            
set_user_frags(idget_user_deaths(id) )
        } 
will not work. Why? Here is a quick scenario. I have 25 frags and 8 deaths. When you use cs_set_user_deaths( id, get_user_frags( id ) ), you changed the deaths to 25, so now I have 25 frags and 25 deaths. Then you use set_user_frags( id, get_user_deaths( id ) ), so since my frags are 25 (which is equal to the amount of deaths, it is exactly like doing nothing.

But in contrast to the way akcaliberg did, you save the amount of deaths, and then change it. And when you want to change the amount of frags, you use the saved value in the variable 'temp', and all goes well.
__________________
My Plugins:
UltimatePlugin
UltimateSurf
UltimateAdmin
Code:
rcon version | rcon amxx version | rcon meta version
rcon amxx plugins | rcon meta list | rcon status
I AM INACTIVE ON THIS FORUM - For direct contact: [email protected]
tonykaram1993 is offline
 



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 15:49.


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