Raised This Month: $51 Target: $400
 12% 

[REQ] cs_*et_user_can_changeteam


  
 
 
Thread Tools Display Modes
Author Message
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-03-2007 , 19:38   [REQ] cs_*et_user_can_changeteam
#1

Of course, the name is up for contention.

The win32 offset is 125. This is how it works (left side is condition, right side is value of offset):

Code:
Terrorist, not switched teams: 255
Terrorist, switched to CT: 511
Terrorist, switched to SPEC: 256

CT, not switched teams: 255
CT, switched to Terrorist: 511
CT, switched to SPEC: 256

SPEC, not switched teams: 0
SPEC, switched to Terrorist: 256
SPEC, switched to CT: 256
I don't quite understand why the values change based on what team you were on and what team you are on now. Since I don't think the game actually uses that for anything relevant, this is how I'd do it (except, in Pawn):

Code:
public cs_get_user_can_changeteam(id) {     return get_pdata_int(id,125) < 256; } public cs_set_user_can_changeteam(id,value) {     return set_pdata_int(id,125,value ? 255 : 256); }

I tested this and it works correctly, with no side-effects. It should be noted, though, the a user can change team no matter what if they are alive.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 18:22.


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