Szerző Téma: Client vagy Server Script?  (Megtekintve 914 alkalommal)

Client vagy Server Script?
« Dátum: 2013. Július 13. - 10:39:35 »
0 Show voters
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 :)

Nem elérhető jana4

  • 5929
  • Ex Staff
    • Profil megtekintése
Client vagy Server Script?
« Válasz #1 Dátum: 2013. Július 13. - 12:29:49 »
0 Show voters



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.

Client vagy Server Script?
« Válasz #2 Dátum: 2013. Július 13. - 15:52:14 »
0 Show voters
Oks, THX

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal