Jump to content

[HELP]


Recommended Posts

Posted
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)

 

Posted (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 by Felix5k
Posted (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 by Burak5312

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...