EeZeeRo Posted October 24, 2020 Share Posted October 24, 2020 (edited) /youndexfood_job/30: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil] 1 local getJobPick = createPickup (-449.05, 595.59, 16.91, 3, 1275, 0) 2 job = false 3 4 function getJob(player) 5 if player == localPlayer then 6 if job == false then 7 job = true 8 outputChatBox("Ты устроился на работу!") 9 OrderMarker = createMarker(-440.51703, 601.22876, 16.01869, "cylinder", 2, 0, 155, 255, 200) 10 OrderSphere = createColSphere(-440.51703, 601.22876, 17.01869, 2) 11 else 12 job = false 13 outputChatBox("Ты уволен, катись нахрен отсюда!") 14 destroyElement(OrderMarker) 15 destroyElement(OrderSphere) 16 end 17 end 18 end 19 addEventHandler("onClientPickupHit", getJobPick, getJob) 20 21 function getOrder() 22 if player == localPlayer then 23 if job == true then 24 outputChatBox("Иди в попу") 25 else 26 outputChatBox("Ты тут не работаешь!") 27 end 28 end 29 end 30 addEventHandler("onClientColShapeHit", OrderSphere, getOrder) Please, help me. Edited October 24, 2020 by EeZeeRo Link to comment
Tekken Posted October 24, 2020 Share Posted October 24, 2020 Move the event handler to getJob function 1 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