[Solved] PW - Bank System and Drop After Death Problems

Currently viewing this thread:


I am currently trying do develop three systems for PW, the first is a bank system, the second is a logging system and the third is a private house system.

[Solved] The first problem I need help with is that when a player quits, a part of his or her money drops as a money bag. With which operations can I notice that player went offline when this death occurs so I can prevent the dropping in that part of the script? (agent_killed)

[Solved] The second is that I don't know how to listen to the event occurring when someone presses F while looking at the bank object.

Many thanks to those trying to help.


I just found a solution for the first problem. When a player gets killed by another, killer_agent_id is set to the killer's id. When a players gets himself killed by events like drowning, jumping off from a high place, the killer and the dead player's ids are the same. But when a player disconnects, it's killer's id is -1. Quite easy to notice and take care of.

Unfortunately, my question for the second problem still stands.


Grandmaster Knight
Check module_scene_props, you can use some triggers(see header_triggers) in there aswell. See other props for examples on how to use certain triggers.


# Helper to generate a trigger that calls a script after completely using.
def spr_call_script_use_trigger(script_name, *args):
  return spr_call_script_trigger(ti_on_scene_prop_use, script_name, *args)

# Helper to generate a trigger that calls a script after starting usage.
def spr_call_script_start_use_trigger(script_name, *args):
  return spr_call_script_trigger(ti_on_scene_prop_start_use, script_name, *args)

# Helper to generate a trigger that calls a script after canceling usage.
def spr_call_script_cancel_use_trigger(script_name, *args):
  return spr_call_script_trigger(ti_on_scene_prop_cancel_use, script_name, *args)

Seems these will help, thank you.

For those who might be interested in the same thing, these triggers eventually call scripts called "cf_use_inventory" and "cf_pick_lock...." (something like that).
This info is quite enough for those trying to develop a bank system or something that has to do with chests.
Top Bottom