sckatchof Posted December 18, 2011 Posted December 18, 2011 why this code doesn't work !! local PoliceMarker = createMarker ( 95.099998474121, 1924.8000488281, 17.10000038147, 'cylinder', 1.8, 0, 100, 255, 150 ) PoliceGui = guiCreateWindow(227,106,342,376," Police job",false) Have_Job1 = guiCreateButton(39,313,111,45,"Have job!",false,PoliceGui) Cancel1 = guiCreateButton(200,312,111,45,"Cancel",false,PoliceGui) Doel1 = guiCreateMemo(63,44,234,242,"Police Job:\nAs police you will have a hourly payment. Further objectves comming soon!",false,PoliceGui) guiMemoSetReadOnly( Doel1,true ) guiSetVisible(PoliceGui, false) addEventHandler("onClientMarkerHit", PoliceMarker, function(hitElement) if hitElement == localPlayer then if (guiGetVisible(PoliceGui) == false) then guiSetVisible(PoliceGui, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox ("The police doesn't want you. Please re-enter the marker.") end end end )
bandi94 Posted December 18, 2011 Posted December 18, 2011 (edited) local PoliceMarker = createMarker ( 95.099998474121, 1924.8000488281, 17.10000038147, 'cylinder', 1.8, 0, 100, 255, 150 ) PoliceGui = guiCreateWindow(227,106,342,376,"Police job",false) Have_Job1 = guiCreateButton(39,313,111,45,"Have job!",false,PoliceGui) Cancel1 = guiCreateButton(200,312,111,45,"Cancel",false,PoliceGui) Doel1 = guiCreateMemo(63,44,234,242,"Police Job:\nAs police you will have a hourly payment. Further objectves comming soon!",false,PoliceGui) guiMemoSetReadOnly( Doel1,true ) guiSetVisible(PoliceGui, false) addEventHandler("onClientMarkerHit", PoliceMarker, function(hitElement) if hitElement == getLocalPlayer ( ) then if (guiGetVisible(PoliceGui) == false) then guiSetVisible(PoliceGui, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox ("The police doesn't want you. Please re-enter the marker.") end end end) Edited December 18, 2011 by Guest
sckatchof Posted December 18, 2011 Author Posted December 18, 2011 You made it client sided right? On the meta? of course
sckatchof Posted December 18, 2011 Author Posted December 18, 2011 local PoliceMarker = createMarker ( 95.099998474121, 1924.8000488281, 17.10000038147, 'cylinder', 1.8, 0, 100, 255, 150 ) PoliceGui = guiCreateWindow(227,106,342,376,"Police job",false) Have_Job1 = guiCreateButton(39,313,111,45,"Have job!",false,PoliceGui) Cancel1 = guiCreateButton(200,312,111,45,"Cancel",false,PoliceGui) Doel1 = guiCreateMemo(63,44,234,242,"Police Job:\nAs police you will have a hourly payment. Further objectves comming soon!",false,PoliceGui) guiMemoSetReadOnly( Doel1,true ) guiSetVisible(PoliceGui, false) addEventHandler("onClientMarkerHit", PoliceMarker, function(hitElement) if hitElement == getLocalPlayer ( ) then if (guiGetVisible(PoliceGui) == false) then guiSetVisible(PoliceGui, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox ("The police doesn't want you. Please re-enter the marker.") end end end) same problem
Castillo Posted December 18, 2011 Posted December 18, 2011 That means that you set the script as a server-side script in the meta.xml, check if the script type is "client" or "server".
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