xXMADEXx Posted January 28, 2013 Share Posted January 28, 2013 For some reason, when the player triggers the event, it will not set the team client: triggerServerEvent("rog:teams:setteam:community",localPlayer) server -- Teams teamCommunity = createTeam ("Community", 255, 255, 0) --------- Functions --------- -- Community addEvent("rog:teams:setteam:community",true) addEventhandler("rog:teams:setteam:community", function () setPlayerTeam(source,teamCommunity) end ) Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 Client : triggerServerEvent("rog:teams:setteam:community",localPlayer) Server : teamCommunity = createTeam ("Community", 255, 255, 0) addEvent("rog:teams:setteam:community",true) addEventHandler("rog:teams:setteam:community", function () setPlayerTeam(source,teamCommunity) end ) Link to comment
manve1 Posted January 28, 2013 Share Posted January 28, 2013 (edited) you forgot to make 'H' a capital in the event handler and 'attachedTo' Edited January 28, 2013 by Guest Link to comment
Blaawee Posted January 28, 2013 Share Posted January 28, 2013 addEventHandler ( eventName, element attachedTo, handlerFunction ) have you looking to this !? this is the second time you forget the element that you want to attach To and that will be root hope you don't forget that again Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 oh, lol You should always remember this (: Link to comment
xXMADEXx Posted January 28, 2013 Author Share Posted January 28, 2013 Client : triggerServerEvent("rog:teams:setteam:community",localPlayer) Server : teamCommunity = createTeam ("Community", 255, 255, 0) addEvent("rog:teams:setteam:community",true) addEventHandler("rog:teams:setteam:community", function () setPlayerTeam(source,teamCommunity) end ) This didn't work Link to comment
Vision Posted January 28, 2013 Share Posted January 28, 2013 teamCommunity = createTeam ("Community", 255, 255, 0) addEvent("rog:teams:setteam:community",true) addEventHandler("rog:teams:setteam:community", root, function ( ) setPlayerTeam(source,teamCommunity) end ) Link to comment
xXMADEXx Posted January 28, 2013 Author Share Posted January 28, 2013 teamCommunity = createTeam ("Community", 255, 255, 0) addEvent("rog:teams:setteam:community",true) addEventHandler("rog:teams:setteam:community", root, function ( ) setPlayerTeam(source,teamCommunity) end ) Thanks, lol go figure, always the 'root' Link to comment
Blaawee Posted January 29, 2013 Share Posted January 29, 2013 the third time =) . like i never say something Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now