xXMADEXx Posted January 28, 2013 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 )
iPrestege Posted January 28, 2013 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 )
manve1 Posted January 28, 2013 Posted January 28, 2013 (edited) you forgot to make 'H' a capital in the event handler and 'attachedTo' Edited January 28, 2013 by Guest
Blaawee Posted January 28, 2013 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
xXMADEXx Posted January 28, 2013 Author 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
Vision Posted January 28, 2013 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 )
xXMADEXx Posted January 28, 2013 Author 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'
Blaawee Posted January 29, 2013 Posted January 29, 2013 the third time =) . like i never say something
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