GamingTim Posted April 28, 2014 Share Posted April 28, 2014 Alright so i've created a serverside script which consists of the Admin team and such but i wanted to add a clientside event What should I do? can i just add the clientside event to the serverside script? or create another script, which is clientside? and if so how can i call the functions(teams) on serverside script? (im planning to use the event onClientPlayerDamage) Link to comment
Moderators IIYAMA Posted April 28, 2014 Moderators Share Posted April 28, 2014 create a new file and use that as a client file. In the xml you can define what your files are going to be: https://wiki.multitheftauto.com/wiki/Meta.xml If you don't define, it will be serverside. and don't define as shared, because that is only for code which is only useful for utility functions. Link to comment
GamingTim Posted April 28, 2014 Author Share Posted April 28, 2014 Lets say i have created a Team in the serverside script, but there's an event/function that is clientside that i wanted to created and so i created another script ,named it clientside script. how do i link the clientside to the server side? Link to comment
Moderators IIYAMA Posted April 28, 2014 Moderators Share Posted April 28, 2014 Well we are now talking about 2 systems. A server. A mta (client). You can't link them, they are operating apart. You must keep in mind that a server(serverside) is very far away from you(clientside). Example: You are in Spain and the server is in Germany. But you can communicate: https://wiki.multitheftauto.com/wiki/TriggerServerEvent https://wiki.multitheftauto.com/wiki/TriggerClientEvent https://wiki.multitheftauto.com/wiki/SetElementData Most serverside functions are also sharing information directly. But if you want to get a serverside team at clientside. You can use this clientside: https://wiki.multitheftauto.com/wiki/GetTeamFromName or trigger it. 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