How can i read or write some of the data of the prop that is inside of the table like Table: m_Item (offset 60) (type DT_ScriptCreatedItem)
? thanks
Syntax: Select all
from players._base import *
from messages import SayText2
from messages import *
from commands.client import ClientCommand
from commands.typed import TypedServerCommand
from commands.typed import filter_str
from commands.say import SayCommand
from weapons.entity import Weapon
from weapons import *
from config.manager import ConfigManager
@ClientCommand('gg')
def ShowExceptionStreak(command_info, pindex):
client = Player(pindex)
gg = client.get_active_weapon().get_property_char("m_szCustomName")
SayText2(str(gg)).send(client.index)
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/commands/auth.py", line 44, in __call__
return self.callback(*args)
File "../addons/source-python/plugins/Something/Something.py", line 19, in ShowExceptionStreak
gg = client.get_active_weapon().get_property_char("m_szCustomName")
File "../addons/source-python/packages/source-python/entities/_base.py", line 565, in get_property_char
return self._get_property(name, 'char')
File "../addons/source-python/packages/source-python/entities/_base.py", line 615, in _get_property
name, self.classname))
ValueError: Property "m_szCustomName" not found for entity type "weapon_g3sg1"