#1

25th Jun 2015 at 12:29 AM
Posts: 186
Thanks: 1023 in 4 Posts
11 Achievements
-- Command To Show Sim Details --
Hi guys, I'm trying to make a command that shows Sim details. Either by the current active Sim, or if a name is specified.
Code:
@sims4.commands.Command('sim.aboutsim', 'sim.about', command_type=sims4.commands.CommandType.Live)
def simalary_AboutSim(first_name='', last_name='', _connection=None):
output = sims4.commands.CheatOutput(_connection)
if first_name == '' and last_name == '':
tgt_client = services.client_manager().get(_connection)
info = tgt_client.active_sim.sim_info
if info is None:
output('No Sim is selected.')
return False
else:
info = services.sim_info_manager().get_sim_info_by_name(first_name, last_name)
if info is None:
output('No Sim with the provided name has been found.')
return False
output('SIM INFO: First name: {}. Last name: {}. Age: {}.'.format(sim_info.first_name, sim_info.last_name, sim_info.age))
return True
But for some reason, the cheat doesn't show anything/do anything. I copied my sim.SetAge cheat, just modified what is shows, but it doesn't work. Is there something I'm missing or doing wrong? Thanks, Sim
Simalary Studios
Contact Me
Send me a PM, or
Visit my Simblr for questions, comments, requests, or just a quick "hi" - I don't bite. If you need to contact me for anything, do so.
Requests
Valid Requests: CAS recolors, Build/Buy Mode recolors, houses or rooms, and simple script mods.