Author Topic: Getting a client's data while they are offline?  (Read 1863 times)

If I have their BL_ID is there something (like a brickGroup) I can use to grab data that is tied to their client as if they were online?

Anything stored on the client object itself without any other modifications? No.
Anything stored on the brickgroup? Yes.
Anything you happened to store in a file, object, or variable about the client? Most likely.

Code: [Select]
if($RP::job::sellItems[findclientbyBL_ID(%sellerID).RPData.value["jobID"]])
That returns with a 0 when the client is offline. Is there something I can do to keep manipulating the values I want to while they are offline?

Create a main SimSet to store all client data, and store every ID's data in a SimObject. Add the SimObject to the SimSet, save often.

Code: [Select]
findclientbyBL_ID(%sellerID).RPData.value["jobID"]

There's your problem. By the looks of it, you are storing all of the data you want to access on the client object a script object. However when the client leaves, it is all deleted (im assuming).

If you're an inexperienced coder, I recommend you just give up on trying to do this now (not trying to sound negative, but its a fairly large task to fix this), or come back to this when you have a better understanding on scripting.

What you want to do is change everywhere how the script stores the data, and put it onto the brickgroup. You can get the brick group from various objects quite easily:
%brick.getGroup()
%client.brickGroup
%player.client.brickGroup
« Last Edit: June 22, 2014, 09:47:04 AM by boodals 2 »

However when the client leaves, it is all deleted (im assuming).

It won't be deleted unless he makes it .