πŸ“±Social Media

Y App

yseries:server:y:new-tweet

Triggered when a new tweet is posted on the Y app.

Event Data:

-- tweetData: {
--     id = number,              -- Tweet ID (insert ID from database)
--     username = string,        -- Username of the tweet author
--     content = string,         -- Tweet content/text
--     attachments = table|nil,  -- Attachments array (can be nil)
--     replyTo = number|nil      -- ID of tweet being replied to (can be nil for new tweets)
-- }
-- playerIdentifier: string|nil  -- Player identifier (can be nil)

Usage Example:

RegisterNetEvent('yseries:server:y:new-tweet', function(tweetData, playerIdentifier)
    print("New tweet posted!")
    print("Tweet ID:", tweetData.id)
    print("Username:", tweetData.username)
    print("Content:", tweetData.content)
    
    -- Example: Log tweet to external system
    -- YourLoggingSystem:LogTweet(tweetData, playerIdentifier)
    
    -- Example: Trigger custom logic
    -- if string.find(tweetData.content, "keyword") then
    --     -- Do something
    -- end
end)

Notes:

  • The attachments field is a table/array that may contain photos or other media

  • The replyTo field is set when replying to an existing tweet, otherwise it's nil

  • The playerIdentifier can be nil if the player is not found


Instashots

yseries:server:instashots:on-new-post

Triggered when a new post is created on Instashots.

Event Data:

Note: The post ID is not included in the event data, but the post is already saved to the database when this event fires.

Usage Example:

Notes:

  • The attachments.media field is an array of media URLs/photos

  • The attachments.taggedPeople field contains an array of usernames that were tagged in the post

  • Tagged people are automatically converted to usernames only (not full user objects)


News

yseries:server:news:new-article

Triggered when a new news article is created and published.

Event Data:

Usage Example:

Notes:

  • Only users with permission to create news articles can trigger this event

  • The imageUrls field is a JSON-encoded array of image URLs

  • The article is automatically broadcast to all clients after creation


YBuy (Marketplace)

yseries:server:ybuy:on-new-ad

Triggered when a new advertisement is created on YBuy marketplace.

Event Data:

Usage Example:

Notes:

  • The attachments field is a JSON-encoded string that needs to be decoded to access attachment data

  • The price field is sanitized before being saved to the database

  • The ad is immediately available in the marketplace after creation


PromoHub

yseries:server:promoHub:on-new-ad

Triggered when a new promotional advertisement is created on PromoHub.

Event Data:

Usage Example:

Notes:

  • Title and contact name are automatically trimmed to 50 characters

  • Description is automatically trimmed to 5000 characters

  • The attachments field is a JSON-encoded string that needs to be decoded to access attachment data

Last updated