Raised This Month: $ Target: $400
 0% 

Setting user's frags in TS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Prometheus.
Member
Join Date: Sep 2004
Old 02-26-2005 , 13:04   Setting user's frags in TS
Reply With Quote #1

Code:
new Change = 1 new Frags = get_user_frags(id) Frags = Frags+Change set_user_frags(id,Frags+Change)

It gets the correct number of frags, but it just doesn't increase the number. Any ideas?[/small]
.Prometheus. is offline
Send a message via AIM to .Prometheus. Send a message via MSN to .Prometheus.
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 02-26-2005 , 14:08  
Reply With Quote #2

i have no idea but ur code is a little messy here is ur best way
Code:
new change = 1; set_user_frags(id,get_user_frags(id)+change) ;
Freecode is offline
.Prometheus.
Member
Join Date: Sep 2004
Old 02-26-2005 , 14:14  
Reply With Quote #3

Thanks, I'm gonna see if it'll just set a guys frags to 3 by doing set_user_frags(id,"3")
.Prometheus. is offline
Send a message via AIM to .Prometheus. Send a message via MSN to .Prometheus.
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-26-2005 , 15:37  
Reply With Quote #4

Dont use set_user_frags(id,"3"), you need the last parameter to be an integer (not a string): set_user_frags(id,3)

Anyway, are you sure it doesn't work? It's possible that simply the scoreboard isn't updating with the new data. Try killing yourself after you set it or something and see if it displays the correct amount then.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
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 13:58.


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