Jump to content

help me


DiGiTal

Recommended Posts

Please if anyone can to answre to my questions ?

1)* Any directory surrounded with [...] will be assumed to contain further directories and resources."" (i need to do [..] for all my resources??? )

2) i'm just learning how to script (What is the difference between client side and server side ,i went to mta wiki but no understood)

3)For example: i wanna create Login panel , i created the gui by guieditor but when somone click to Login how to create him server side or client side .SO, how to CREATE SCRIPT BY GUI EDITOR ?

4)In LUA File i'll put my script ???

                                                                                                               Thanks for all

Link to comment

About your first question. Any directory surrounded with [ ] is not seen as a resource by mta. That means that you can create one folder in "deathmatch" and put all of your scripts in there. A quick example:

 

I have a folder called "[scripts]" in my "deathmatch" folder. Inside the "[scripts]" folder all of the resources are in normal folders (without [ ]). So a help panel for example will be like this:

...mods/deathmatch/resources/[scripts]/helppanel

 

And you can put as many resources in the "[scripts]" folder as long as they're in a normal folder (without the [ ]).

--------------------------------------------------------

Now your second question. Difference between client and server side is this:

All GUI elements and things which affect ONLY one player without others on the server noticing any changes belong in a client-side script. 

 

Everything that affects NOT JUST one player but a lot or all players belong in a server-side script. Also all functions connected to accounts work only server-side as the accounts database is located on the server itself, not on every player's computer. 

 

For more details you can see functions and event handlers on the wiki. In the upper right corner it's written weather it can be used only client-side,  only server-side or on both sides.

--------------------------------------------------------

And about your problem with the login panel you'll need to triggerServerEvent when a player presses on the register or login button in the gui. Now another thing:

triggerServerEvent is only client-side and triggerClientEvent is only server-side. Events are a way for client and server side scripts to communicate with each other and exchange data if needed. 

Edited by koragg
Link to comment
  • 4 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...