Jump to content

About Clientside and Serverside functions/events


GamingTim

Recommended Posts

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

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

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...