π±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
attachmentsfield is a table/array that may contain photos or other mediaThe
replyTofield is set when replying to an existing tweet, otherwise it'snilThe
playerIdentifiercan benilif 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.mediafield is an array of media URLs/photosThe
attachments.taggedPeoplefield contains an array of usernames that were tagged in the postTagged 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
imageUrlsfield is a JSON-encoded array of image URLsThe 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
attachmentsfield is a JSON-encoded string that needs to be decoded to access attachment dataThe
pricefield is sanitized before being saved to the databaseThe 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
attachmentsfield is a JSON-encoded string that needs to be decoded to access attachment data
Last updated