Kasem Posted February 10, 2014 Share Posted February 10, 2014 hi please i have a question about how To Add a countdown in a marker when the player stand up inside the marker he will se a Countdown in the screen i want it to start from 10:00 muite to 00:00 when the Countdown finnish the gate will be opened automatic . Link to comment
myonlake Posted February 10, 2014 Share Posted February 10, 2014 You will have to make an event for when a player enters the marker. That event will trigger the next function, which will calculate the countdown client-side, and while it does that it will also render countdown text on the screen. When the countdown is over, it will use the moveObject function server-side to move the gate. Link to comment
Kasem Posted February 10, 2014 Author Share Posted February 10, 2014 i am sorry i am new in scripting can explane to me what's the difference between Client & server Link to comment
myonlake Posted February 10, 2014 Share Posted February 10, 2014 I'd like to refer you to read the following material to learn more about Lua and Lua in MTA: Lua: Lua Manuals and Tutorials Lua & MTA: Introduction to Resources Lua & MTA: Scripting Introduction Lua & MTA: Introduction to Scripting the GUI The "Scripting Introduction" is essential for you to learn the difference between client-/server-side scripting. Link to comment
Moderators IIYAMA Posted February 10, 2014 Moderators Share Posted February 10, 2014 Bawan said: i am sorry i am new in scripting can explane to me what's the difference between Client & server Wiki isn't always clear, (programmers language) Client = Your pc. ( client scripts will be send to your pc and your pc will execute them) Server = Will only be executed on the server(hoster) and won't be downloaded by: you, myonlake and me. And yes, follow the links of myonlake. If you don't understand it, you can always discus that here. Link to comment
Saml1er Posted February 10, 2014 Share Posted February 10, 2014 By karevan from DDC: The actual difference between client and server, explained basically: The scripts you run on the server, run on a machine which is common for all players, that machine synchronizes all players and shares their information. Server scripts run just once and on one machine. The scripts you run on a client run on the PC of each player. The client "talks" with the server to know about the other players, where they are, what they do, etc... Client scripts run once on every player. This means you can have the same script running in different ways on different machines, with different players. But having the same code. So, while things that happen in server happen at the same time for all connected clients (or players), things that happen on client happen in a different time for each client (or player). Also check this tutorial: viewtopic.php?f=148&t=71106&p=660192#p660192 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now