clan_tag

Please post any questions about developing your plugin here. Please use the search function before posting!
MrMalina
Member
Posts: 53
Joined: Mon Apr 08, 2013 2:40 pm
Location: Russian Federation

clan_tag

Postby MrMalina » Sun Oct 11, 2015 6:31 pm

Good evening.
I tried to identify clantag player. I found the value of offset, added them to the data\source-python\entities\csgo\cssplayer.ini:

Syntax: Select all

[instance_attribute]

[[clan_tag]]
offset_linux = 29
offset_windows = 12
type = STRING_ARRAY


If you use the following code, an error.

Code:

Syntax: Select all

@Event('player_say')
def player_say(event):
player = PlayerEntity(index_from_userid(event.get_int('userid')))

# player.set_clan_tag("test")

print(player.clan_tag)


I added a couple of print about the error and found what causes it:
packages\source-python\memory\manager.py:
Function fget (line 402):

Syntax: Select all

def fget(ptr):
"""Return the instance attribute value."""
# Handle custom type
if not native_type:
return self.convert(type_name, ptr + offset)

# Handle native type
print(ptr)
print('get_' + type_name)
print(offset)
print(getattr(ptr, 'get_' + type_name))
print(getattr(ptr, 'get_' + type_name)(offset))
return getattr(ptr, 'get_' + type_name)(offset)


Error:
The attachment Скриншот 2015-10-11 21.21.10.jpg is no longer available

http://hostingkartinok.com/show-image.php?id=8882856cf89a98d0245e9c4c98a78888
Attachments
Скриншот 2015-10-11 21.21.10.jpg
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Oct 11, 2015 7:15 pm

I'm not sure how you found those offsets, but they are not correct. I have not had a chance to test Linux, yet, but this works fine on Windows:

Syntax: Select all

[instance_attribute]

[[clan_tag]]
offset_windows = 8280
offset_linux = 8304
type = STRING_ARRAY
Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: Bing [Bot] and 125 guests