xeon17 Posted September 12, 2014 Posted September 12, 2014 (edited) Hello there , I have problem with TriggerServerEvent , when i click on the Accept GUI it show me these errors , i'm still learning this function so can someone tell me what i'm doing and to fix it please. Errors: [2014-09-12 18:20:45] WARNING: (GW)LEI\BOPE.lua:29: Bad argument @ 'getPlayerTeam' [Expected player at argument 1, got nil] [2014-09-12 18:20:45] WARNING: (GW)LEI\BOPE.lua:30: Bad argument @ 'setPlayerTeam' [Expected player at argument 1, got nil] [2014-09-12 18:20:45] WARNING: (GW)LEI\BOPE.lua:31: Bad argument @ 'setElementModel' [Expected element at argument 1, got nil] Client: Script removed cuz so much stealers . Server: ----------------------------------------------------- -- script Base & MAP LEI (Server) -- @author XeoN - Banex -- @update 30.08.2014 ----------------------------------------------------- Edited September 12, 2014 by Guest
Bonsai Posted September 12, 2014 Posted September 12, 2014 Just read https://wiki.multitheftauto.com/wiki/TriggerServerEvent carefully.
darhal Posted September 12, 2014 Posted September 12, 2014 Dont use player in the function that u trigger server sided use client or source and change the function arguments function() and not function(player) and replace player inside the function to client or source
xeon17 Posted September 12, 2014 Author Posted September 12, 2014 Dont use player in the function that u trigger server sided use client or source and change the function argumentsfunction() and not function(player) and replace player inside the function to client or source Thank you man solved is everything correct with this part? because i can't test with more players. triggerServerEvent ( "onAccepted", resourceRoot )
darhal Posted September 12, 2014 Posted September 12, 2014 No use triggerServerEvent('onAccepted', root)
xeon17 Posted September 12, 2014 Author Posted September 12, 2014 No use triggerServerEvent('onAccepted', root) Why ? what it will change? i want to learn more about this function
darhal Posted September 12, 2014 Posted September 12, 2014 Sure root and resourceRoot are just smilair u can use then both but use root more better resourceRoot is giving the resource root element but root give all resource root element any more questions
xeon17 Posted September 12, 2014 Author Posted September 12, 2014 Sure root and resourceRoot are just smilair u can use then both but use root more better resourceRoot is giving the resource root element but root give all resource root element any more questions That''s all , thanks for your help Regards!
Saml1er Posted September 12, 2014 Posted September 12, 2014 Sure root and resourceRoot are just smilair u can use then both but use root more better resourceRoot is giving the resource root element but root give all resource root element any more questions You are wrong here. root uses more cpu usage bzcaause it's sending message to all elements and resourceRoot will send message to elements within resource. resourceRoot is better.
darhal Posted September 12, 2014 Posted September 12, 2014 Thats what i said for me root better anyway we should increase the cpu for great performance
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