GTA Közösség - A magyar GTA fórum

Hatalmas Archívum => GTA IV => További GTA szériák => Segítség => A témát indította: Campe3r - 2013. Július 13. - 10:39:35

Cím: Client vagy Server Script?
Írta: Campe3r - 2013. Július 13. - 10:39:35
Sziasztok! Sokan tudhatjátok, hogy IV-MP Szerveren vannak scriptek, írtam is egy kisebb scriptet, csak nem tudom hová tartozik, client vagy server scripthez?
Meg valaki le tudná írni, hogy melyik mire jó?
Elõre is köszönöm :)
Cím: Client vagy Server Script?
Írta: jana4 - 2013. Július 13. - 12:29:49



There is two kinds of scripts in IV-MP (Version 0.1 and up).
One is the client side scripts, these are scripts that run on the client side and allow you to manipulate things like the user interface that people see. It also allows you to handle key events.
On the other side there are the server scripts. As the name suggests these run on the server, they let you hook into global events such as a player connecting or entering a vehicle.
The two scripts can communicate by creating events and triggering those (triggerServerEvent to trigger a server event from the client, and triggerClientEvent to trigger a client event from the server).
 
A szerver oldali például ha csatlakozik egy játékos, vagy belép egy jármûbe stb.

A kliens oldali pedig a GUI (Grafikus Felhasználói Felület, pl. egyedi párbeszédpanelek) alkalmazásakor szükségesek.
Cím: Client vagy Server Script?
Írta: Campe3r - 2013. Július 13. - 15:52:14
Oks, THX