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(id, get_user_frags(id) )
set_user_frags(id, get_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.
__________________