|
1 | 1 | # SF.lua |
2 | | -<p align="center"><img src="/logo.png" height="250px" /></p> |
| 2 | +<p align="center"><img src="./logo.png" height="250px" /></p> |
3 | 3 |
|
4 | | -SF.lua is library for [MoonLoader](https://www.blast.hk/moonloader), which provides an opportunity to interact with SA-MP. This library doesn't replace all [SAMPFUNCS](https://www.blast.hk/sampfuncs), it just adds new functions for Lua script. |
5 | | -Version: v0.78.7-alpha. |
| 4 | +SF.lua is a lua library for [MoonLoader](https://www.blast.hk/moonloader) that interaction with SA:MP. This library doesn't replace all [SAMPFUNCS](https://www.blast.hk/sampfuncs), it just adds new functions for the Lua script. |
| 5 | + |
| 6 | +Version: v1.0-beta. |
6 | 7 |
|
7 | 8 | ## Progress |
8 | | -At the moment, SF.lua is done at 78%, of this left: |
| 9 | +At the moment, SF.lua doens't have all the functionality of SAMPFUNCS: |
9 | 10 | * Events onSendRpc/onSendPacket/etc; |
10 | | -* Functions with sending RPC/Packet; |
11 | | -* Custom handler of commands. |
| 11 | +* Some RakNet functions; |
| 12 | +* Custom handler for commands. |
12 | 13 |
|
13 | 14 | ## Functional |
14 | | -Supporting versions of SA-MP: [0.3.7-R1](https://forum.sa-mp.com/showthread.php?t=572700). There are also new features for easy interaction. |
| 15 | +Supporting versions of SA-MP: `0.3.7-R1`, `0.3.7-R3-1` and `0.3.7-R5-1`. |
| 16 | + |
15 | 17 | There will be no functions in SF.lua: |
16 | | -* Associated with the creation/editing of custom windows DXUT; |
| 18 | +* Functions for manipulating of DXUT windows; |
17 | 19 | * Interaction with SAMPFUNCS/CLEO. |
18 | 20 |
|
19 | | -## Members |
20 | | -Main developers: [imring](https://github.com/imring), [DonHomka](https://github.com/DonHomka), [THE-FYP](https://github.com/THE-FYP), [4el0ve4ik](https://github.com/4el0ve4ik) |
21 | | -Also thanks: |
22 | | -* [Akionka](https://github.com/Akionka) - development and testing assistance; |
23 | | -* [crybaby](https://www.behance.net/schweitzerr) - created a logo for this project. |
| 21 | +New functions: |
| 22 | +```lua |
| 23 | +sampAddChatMessageEx(type_msg, text, prefix, color, pcolor) -- Add a message with a specific type (CHAT/INFO/DEBUG) |
| 24 | +sampAddDeathMessage(killer, killed, clkiller, clkilled, reason) -- Add a death message |
| 25 | +sampGetLocalPlayerId() -- Get local player ID |
| 26 | +sampGetLocalPlayerNickname() -- Get local player nickname |
| 27 | +sampGetLocalPlayerColor() -- Get local player color |
| 28 | +sampSetPlayerColor(id, color) -- Set player color (client-side) |
| 29 | +sampIsPlayerDefined(id) -- Does player ped exist by player ID |
| 30 | +sampIsVehicleDefined(id) -- Does vehicle exist by vehicle ID |
| 31 | +``` |
24 | 32 |
|
25 | 33 | ## Installation |
26 | | -Directory **SFlua** copy to path **moonloader/lib**. |
| 34 | +Copy the entire folder `sflua` into the `moonloader/lib` directory. |
| 35 | + |
| 36 | +# Depends |
| 37 | +SF.lua depends on the library [`SAMP-API.lua`](https://github.com/imring/SAMP-API.lua). |
27 | 38 |
|
28 | 39 | ## Links |
29 | 40 | Official thread at BlastHack: https://blast.hk/threads/51388/ |
0 commit comments