Jump to content

3 Screenshots

  • 29.9k
  • 353
  • 8.76 kB
  • Update details
    v1.0.0
    Released
    Download size 8.76 kB
    Total versions 1
    Freshness Updated 1172 days ago

About Player Event States

Illustrated player and server-wide state storage; not a product interface screenshot.

Player Event States

For plugin developers and admins using Dialogs. Store true/false values for individual players or the whole server, then read them from another plugin to change later interactions.

For example: meeting Bob sets a player state. Alice can check that state before offering the next conversation.

A previous choice changes the next conversation

Section divider

Illustrated example: Dialogs stores a choice and checks it in a later conversation.

Dialogs already reads and writes these states. Create dialogue conditions and state changes in its PimpMyRust editor, without writing your own integration plugin.

PimpMyRust browser tools. The adjacent link opens the separate Dialogs editor; Player Event States has no standalone configurator.

Open the Dialogs editor →

Player Event States is a storage/API plugin: no standalone configurator, player interface, quests or rewards. Dialogs requires it; it does not require Dialogs.

Connect your own gameplay plugin

Section divider

Install PlayerEventStates.cs in oxide/plugins, reference it with [PluginReference], then use its API.

Method Purpose
GetEventStatePlayer_API(ulong, string) Read a player's state; an absent key returns false
SetEventStatePlayer_API(ulong, string, bool) Set or create a player's state
GetEventStateGlobal_API(string) Read or create a global state
SetEventStateGlobal_API(string, bool) Set an existing global state
PlayerHasRecquiredStates_API(ulong, Dictionary<string, bool>) Check a set of expected player states

Keep the published spelling Recquired. For a new global key, call its getter before the setter.

Keep the progress files

Section divider

States live in oxide/data/PlayerEventStates/: user_<steamid>.json and global_events.json. They are saved on server saves and plugin unload, not immediately after every API call.

There is no automatic expiry or wipe reset. Back up this directory and do not replace live progress with example files.

API examples and persistence guide →

 

 

 

 

 

  • Like 2

flutes
flutes's Collection
Explore more files from this creator.

User Feedback

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.2m
Total downloads
Customers
12.3k
Customers served
Files Sold
174.4k
Total sales
Payments
3.8m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.