Search the Community
Showing results for tags 'invite'.
-
Hi, I Have Problem In Team System !!! The Idea is to set ElementData by Panel... And when the Player have that ElementData he can join the Team .. Can anyone help me ?? PLease :\ This Is the Code ------------------------------------------------ function Invitar (player) local Vipteam = getTeamFromName("F.B.I") local thePlayer = getPlayerFromName(source) if (Vipteam) then setElementData ( source,"F.B.I",true) outputChatBox ( "#00FF00To Join #2EFF9A*F.B.I* #FF0000/accept",source, 0, 255, 0, true ) else cancelEvent() end end addEvent( "FBI", true) addEventHandler( "FBI", getRootElement(), Invitar ) ------------------------------------------------------------- addCommandHandler( "accept", function(player) if getElementData(player,"Player") and getElementData(player,"F.B.I") == true then setPlayerTeam(player, Vipteam) triggerClientEvent (source, "lainvitacion", source) else cancelEvent() outputChatBox ( "#FF0000You Are Not Invited To Any Clan !!",source, 0, 255, 0, true ) end end ) And This the Errors that i got :\ WARNING: TeamSystem\server.lua:54: Bad argument @ 'getPlayerFromName' [Expected string at argument 1, got player] WARNING: TeamSystem\server.lua:89: Bad argument @ 'getPlayerFromName' [Expected string at argument 1, got nil] WARNING :TeamSystem\server.lua:90: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] Thanks