📱
APhone
  • What is APhone ?
  • Installation
    • Workshop
    • Configuration ( Lua part )
    • Configuration ( In-game )
  • How you make your own apps
    • Create your first app
    • App functions
    • App Metas
    • Tips you NEED to know
  • API ( Clientside )
    • Parameters ( Clientside )
    • UI - General Functions
    • UI - Required Functions
    • UI - Colors
    • UI - Fonts
    • UI - Web/Imgur Pictures
    • UI - Renderview
    • UI - Stencils
    • UI - Panels
    • Notifications
    • Rotate functions
  • API ( Shared )
    • Numbers
  • API - App Specific
    • Contacts ( Clientside )
    • Messages ( Clientside )
    • Bank ( Shared )
Powered by GitBook
On this page
  • Save Value - aphone.Clientside.SaveSetting(string name, any var)
  • Get Value - aphone.Clientside.GetSetting(string name, any fallback)
  • Create a in-game setting - aphone:RegisterParameters(string catName, string paramName, string short_name, string var_type, any defaultValue, function onChange)
  • Get in-game setting value - aphone:GetParameters(string catName, string shortName, any fallback)
  • Change in-game parameters - aphone:ChangeParameters(string catName, string short_name, any newvalue)

Was this helpful?

  1. API ( Clientside )

Parameters ( Clientside )

APhone got a Clientside Save system. Allowing people to make saving parameters in a short amount of time. Also, these parameters can show theirself into the settings app.

PreviousTips you NEED to knowNextUI - General Functions

Last updated 4 years ago

Was this helpful?

Save Value - aphone.Clientside.SaveSetting(string name, any var)

Parameters

Purpose

Name

Unique name

Var

Value

Internally, this use JSON format. So please read the warnings there :

aphone.Clientside.SaveSetting("hello", true)

Get Value - aphone.Clientside.GetSetting(string name, any fallback)

Parameters

Purpose

Name

Unique name

Fallback

If the value doesn't hold any values, will return fallback

aphone.Clientside.GetSetting("GetMyName", "I don't got any name" )

Create a in-game setting - aphone:RegisterParameters(string catName, string paramName, string short_name, string var_type, any defaultValue, function onChange)

Parameters

Purpose

catName

Category name

paramName

Pretty name of the setting

short_name

Unique name ( For SaveSetting )

var_type

string, num or bool

defaultValue

Default value

onChange

( Optional ) Function to execute

Creating a parameter named "Hello", bool

aphone:RegisterParameters("Tutorials", "Hello It's me", "hello", "bool", false,
    function()
        print("Hello, me !")
    end)

Get in-game setting value - aphone:GetParameters(string catName, string shortName, any fallback)

The values required are the same as RegisterParameters

aphone:GetParameters("Tutorials", "hello", false)

Change in-game parameters - aphone:ChangeParameters(string catName, string short_name, any newvalue)

aphone:GetParameters("Tutorials", "hello", "Set the value to a string")

The values required are the same as RegisterParameters

https://wiki.facepunch.com/gmod/util.TableToJSON