AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Setting user's frags in TS (https://forums.alliedmods.net/showthread.php?t=10671)

.Prometheus. 02-26-2005 13:04

Setting user's frags in TS
 
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]

Freecode 02-26-2005 14:08

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) ;

.Prometheus. 02-26-2005 14:14

Thanks, I'm gonna see if it'll just set a guys frags to 3 by doing set_user_frags(id,"3")

XxAvalanchexX 02-26-2005 15:37

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.


All times are GMT -4. The time now is 13:58.

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