Server

Guide to use the script more advanced

Server Events

Developers can take your script to the next level by utilizing server events for integration

AddMoney

Use this event when the player receives cash

Attribute:

  • playerid:

    • integer: server id of the player

  • monetype:

    • string: type of the money

  • amount:

    • integer: amount of money

  • currentbalance:

    • integer: the player's current balance of money

  • reason:

    • string: any reason can be added for the transfer

Usage
TriggerEvent('highqez_cashitem:server:AddMoney', playerid, moneytype, amount, currentbalance, reason)

RemoveMoney

Use this event when the player loses cash

Attribute:

  • playerid:

    • integer: server id of the player

  • monetype:

    • string: type of the money

  • amount:

    • integer: amount of money

  • currentbalance:

    • integer: the player's current balance of money

  • reason:

    • string: any reason can be added for the transfer

Usage
TriggerEvent('highqez_cashitem:server:RemoveMoney', playerid, moneytype, amount, currentbalance, reason)

SetMoney

Use this event when the player's cash is reset to certain value

Attribute:

  • playerid:

    • integer: server id of the player

  • monetype:

    • string: type of the money

  • amount:

    • integer: amount of money

  • reason:

    • string: any reason can be added for the transfer

Usage
TriggerEvent('highqez_cashitem:server:SetMoney', playerid, moneytype, amount, reason)

AddItem

Use this event when an item is added to the player

Attribute:

  • playerid:

    • integer: server id of the player

  • item:

    • string: name of the item

  • amount:

    • integer: amount of item

Usage
TriggerEvent('highqez_cashitem:server:AddItem', playerid, item, amount)

RemoveItem

Use this event when an item is removed from the player

Attribute:

  • playerid:

    • integer: server id of the player

  • item:

    • string: name of the item

  • amount:

    • integer: amount of item

Usage
TriggerEvent('highqez_cashitem:server:RemoveItem', playerid, item, amount)

ClearInventory

Use this event when clearing the player's inventory

Attribute:

  • playerid:

    • integer: server id of the player

Usage
TriggerEvent('highqez_cashitem:server:ClearInventory', playerid)

Last updated

Was this helpful?