Player API
Zarządzanie sesją gracza w server/player.lua
LoadPlayer
IntactRP.LoadPlayer(source, characterData)Ładuje dane postaci do sesji. Ustawia wszystkie pola, buduje groups, notifikuje klienta i triggeruje intactrp:characterLoaded.
SavePlayer
IntactRP.SavePlayer(source) -- booleanZapisuje pozycję, skina, job, accounts do bazy.
SetPlayerData
IntactRP.SetPlayerData(source, key, value)Aktualizuje pole w sesji. Automatycznie sync groups dla job, job_grade, group.
Struktura gracza
| Pole | Typ | Opis |
|---|---|---|
identifier | string | License gracza |
source | number | Server ID |
name | string | Nazwa |
slot | number | Slot postaci |
firstname | string | Imię |
lastname | string | Nazwisko |
sex | string | m/f |
job | string | Praca |
job_grade | number | Stopień |
group | string | Grupa |
skin | table | Dane skina |
position | table | {x,y,z,heading} |
accounts | table | {money,bank} |
groups | table | {[job]=grade, [group]=level} |
loaded | boolean | Czy załadowana |