I'm working on a fivem script -- Server event to add players to team…
- User
I'm working on a fivem script
-- Server event to add players to team RegisterServerEvent("main-volleyball:server:setteam") AddEventHandler("main-volleyball:server:setteam", function(team) print('hello') print(team) for k,v in pairs(teams) do print(k) print(v) if k == team then teams[k] = source print(teams[k]) end end end)
I want to make it so if the team they are trying to join already has a person it returns a msg to client saying team is full
- Assistant
Here's an updated version of your server event that sends a message to the client when the team is full.
Replace the
TriggerClientEventfunction call with the one you use in your resource to notify clients.lua