Hi,
The client side means the game of the player, and each player has the client side u created.
Then for example you can tell X player to do a action like can't do basic ATTACKS (punch/fist)
mp.game.controls.disableControlAction
, and only this player will not be able to do that. The client side of other players is not influenced by this.
To summary:
- Each player download the client side you created, but each client side is independant.
- The server side tell the client side of a player (or all if you want) to do action, to edit player, show CEF (Chromium Browser)...
- The client side edits the player's gameplay.
So no, client side doesn't target every player at once. It depends on your serverside, but yes server side is pretty all things that is about server.
PS: if you want to all the players to call a function in client side use this:
mp.players.forEach(player => {
player.call("MY FUNCTION", [args1, args2]);
}
To answer the changing color of a vehicle, you have 2 solutions (Server side only):
- If it is by a command, you get the datas of the vehicle by doing
data = player.vehicle
And then you edit the vehicle color by:
data.setColor(int color1, int color2); // first color1 is primary color, then the second is the secondary :)
And here is the code for vehicle colors:
https://wiki.rage.mp/index.php?title=Vehicle_Colors
- Or you have already the vehicle data in a variable, and you pretty just do the same with the variable's name
Also, refer to the wiki they indexed everything, starting by basic development:
https://wiki.rage.mp/index.php?title=Getting_Started_with_Development#Creating_your_first_resource
Hope it helped you.