Firespider Posted May 16, 2023 Share Posted May 16, 2023 Hello! I don't understand why this doesn't work. Can you help? function unit() status = 0 if (status == 0) then createBlipAttachedTo(source, 0, 4, 0, 0, 255) outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeressen megváltoztatad az egységed állapotát: #ffffff||Járőr||", source, 255, 255, 255, true) status = 0+1 else outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Már ez az egységed állapota.", source, 255, 255, 255, true) end end addEvent("Button1", true) addEventHandler("Button1", root, unit) Link to comment
Felix5k Posted May 16, 2023 Share Posted May 16, 2023 (edited) function unit() status = 0 if (status == 0) then createBlipAttachedTo(source, 0, 4, 0, 0, 255) outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeressen megváltoztatad az egységed állapotát: #ffffff||Járőr||", source, 255, 255, 255, true) status = status + 1 else outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Már ez az egységed állapota.", source, 255, 255, 255, true) end end addEvent("Button1", true) addEventHandler("Button1", root, unit) Edited May 16, 2023 by Felix5k Link to comment
βurak Posted May 19, 2023 Share Posted May 19, 2023 (edited) are you calling this event or function somewhere? because if that's the whole code it doesn't do anything because it needs to be called Edited May 19, 2023 by Burak5312 Link to comment
Firespider Posted May 20, 2023 Author Share Posted May 20, 2023 Of course, I invited on the client side. @Burak5312 Link to comment
Firespider Posted May 21, 2023 Author Share Posted May 21, 2023 @Burak5312 I already solved it, but thanks. 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