chore(docs): made few changes for newer version

This commit is contained in:
khtsly 2026-02-12 16:53:57 +07:00
parent 4f874ed34e
commit f5f746b37a
3 changed files with 35 additions and 11 deletions

View file

@ -1,4 +1,4 @@
# Warp <Badge type="tip" text="1.0" /> # Warp <Badge type="tip" text="1.0" /> <Badge type="warning" text="deprecated" />
The public main of the Warp library. The public main of the Warp library.

View file

@ -1,4 +1,4 @@
# Warp <Badge type="tip" text="1.1" /> # Warp <Badge type="tip" text="1.1" /> <Badge type="warning" text="pre-release" />
The public main of the Warp library. The public main of the Warp library.
::: warning ::: warning

View file

@ -1,26 +1,50 @@
# Getting Started <Badge type="tip" text="1.0" /> # Getting Started <Badge type="tip" text="1.1" />
### `Step 1:` ### `Installation`
First, you have to require the Warp module. First, you have to require the Warp module.
```lua ```lua
local Warp = require('path.to.module'); local Warp = require(path.to.module)
``` ```
### `Step 2:` Then, you should do `.Server` or `.Client`
Then, to create a new event you have to use `.Server` function
```lua ```lua
local Remote = Warp.Server("EventName"); local Server = Warp.Server() --> for Server-side only
local Client = Warp.Client() --> for Client-side only
``` ```
### `Step 3:` ### `Basic Usage`
Firing event everytime player join Firing event everytime player join
```lua ```lua
local Players = game:GetService("Players") local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player) Players.PlayerAdded:Connect(function(player: Player)
Remote:Fire(true, player, "Welcome!") Server.Fire("MessageEvent", true, player, "Welcome!")
end) end)
``` ```
Add a listener (works for both `.Invoke` & `.Fire`)
```lua
local connection = Server.Connect("Ping", function(player: Player)
return "Pong"
end)
print(connection.Connected)
-- connection:Disconnect()
```
Send or Request a event
```lua
-- Reliable-RemoteEvent
Client.Fire("test", true, "hey")
-- Unreliable-RemoteEvent
Client.Fire("test", false, "hello from client!!")
-- Invoke
local response = Client.Invoke("Ping")
if not response then
warn("Server didn't ping back :(")
return
end
print(response, "from Server!")
```