Jump to content

setPlayerTeam


Recommended Posts

Posted (edited)

Hello, i'm trying to make a team panel, and set the selected player from "GUIEditor.gridlist[1]" to a team from "team.Gridlist[1]",

and i want to set the player team by getting the team name from team.Gridlist[1], hope you can help me on this. Here is my code, thank you.

SOLVED

Edited by Guest

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

  • Moderators
Posted

Client:

line 15 : triggerServerEvent("setteam", localPlayer,playerName,teamName)

line 10: remove: local team = getTeamName(teamName)

Server:

line 5: Typo(teamnale): local team = getTeamFromName(teamname or "")

NOTE:

You can also send elements(userdata's) from client to server and from server to client.

Like:

triggerServerEvent("example", localPlayer,getPedOccupiedVehicle(localPlayer),getPlayerFromName("IIYAMA")) 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

Thanks a lot

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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