MoeezKhan Posted January 31, 2014 Posted January 31, 2014 hi all i make police job but it not working anybody tell how i fix it GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} getSetVisible(GUIEditor_Window[2], false ) GUIEditor_Window[2] = guiCreateWindow(629,219,481,301,"Police Station",false) guiWindowSetMovable(GUIEditor_Window[2],false) GUIEditor_Label[1] = guiCreateLabel(158,172,166,16,"Move To Police Station ?",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[1] = guiCreateButton(18,199,205,93,"Yes",false,GUIEditor_Window[2]) guiSetFont(GUIEditor_Button[1],"clear-normal") GUIEditor_Button[2] = guiCreateButton(297,201,175,91,"Exit",false,GUIEditor_Window[2]) guiSetFont(GUIEditor_Button[2],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(69,24,338,136,"images/mtalogo.png",false,GUIEditor_Window[2]) Marker = createMarker(1119,1034,10,"cylinder",2,0,255,0) addEventHandler('onClientMarkerHit', Marker, function (hit) if ( hit == localPlayer ) then getSetVisible(GUIEditor_Window[2], true ) showCursor(true) elseif (hit == GUIEditor_Button[1] ) then toggleAllControls( hit, true ) setElementInterior( hit, 6 ) setElementPosition( hit, 264.74969, 77.49036, 1001.03906 ) elseif(hit == GUIEditor_Button[2]) then getSetVisible(GUIEditor_Window[2], false ) showCursor(false) toggleAllControls( hit, false ) end end) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} getSetVisible(GUIEditor_Window[2], false ) GUIEditor_Window[2] = guiCreateWindow(629,219,481,301,"Police Station",false) guiWindowSetMovable(GUIEditor_Window[2],false) GUIEditor_Label[1] = guiCreateLabel(158,172,166,16,"Move To Police Station ?",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[1] = guiCreateButton(18,199,205,93,"Yes",false,GUIEditor_Window[2]) guiSetFont(GUIEditor_Button[1],"clear-normal") GUIEditor_Button[2] = guiCreateButton(297,201,175,91,"Exit",false,GUIEditor_Window[2]) guiSetFont(GUIEditor_Button[2],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(69,24,338,136,"images/mtalogo.png",false,GUIEditor_Window[2]) Marker = createMarker(1119,1034,10,"cylinder",2,0,255,0) addEventHandler('onClientMarkerHit', Marker, function (hit) if ( hit == localPlayer ) then getSetVisible(GUIEditor_Window[2], true ) showCursor(true) elseif (hit == GUIEditor_Button[1] ) then toggleAllControls( hit, true ) setElementInterior( hit, 6 ) setElementPosition( hit, 264.74969, 77.49036, 1001.03906 ) elseif(hit == GUIEditor_Button[2]) then getSetVisible(GUIEditor_Window[2], false ) showCursor(false) toggleAllControls( hit, false ) end end)
Karuzo Posted January 31, 2014 Posted January 31, 2014 Theres no function like 'getSetVisible' . You have to use guiSetVisible.
DNL291 Posted January 31, 2014 Posted January 31, 2014 Try this: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} Marker = createMarker(1119,1034,10,"cylinder",2,0,255,0) addEventHandler( "onClientResourceStart", resourceRoot, function () GUIEditor_Window[2] = guiCreateWindow(629,219,481,301,"Police Station",false) guiWindowSetMovable(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[2], false ) GUIEditor_Label[1] = guiCreateLabel(158,172,166,16,"Move To Police Station ?",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[1] = guiCreateButton(18,199,205,93,"Yes",false,GUIEditor_Window[2]) guiSetFont(GUIEditor_Button[1],"clear-normal") GUIEditor_Button[2] = guiCreateButton(297,201,175,91,"Exit",false,GUIEditor_Window[2]) guiSetFont(GUIEditor_Button[2],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(69,24,338,136,"images/mtalogo.png",false,GUIEditor_Window[2]) end ) addEventHandler( "onClientGUIClick", guiRoot, function () elseif (source == GUIEditor_Button[1]) then toggleAllControls(true) setElementInterior(localPlayer, 6) setElementPosition(localPlayer, 264.74969, 77.49036, 1001.03906) guiSetVisible(GUIEditor_Window[2], false ) showCursor(false) elseif (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[2], false ) showCursor(false) toggleAllControls(false) end ) addEventHandler( 'onClientMarkerHit', Marker, function (hit) if (getElementType(hit) == "player") and (hit == localPlayer) then guiSetVisible(GUIEditor_Window[2], true ) showCursor(true) end end ) Please do not PM me with scripting related question nor support, use the forums instead.
MoeezKhan Posted January 31, 2014 Author Posted January 31, 2014 one more questions what is client side and what is server side i think something wrong
DNL291 Posted January 31, 2014 Posted January 31, 2014 Check this out: https://wiki.multitheftauto.com/wiki/Cl ... _Functions https://wiki.multitheftauto.com/wiki/Se ... _Functions Please do not PM me with scripting related question nor support, use the forums instead.
MoeezKhan Posted January 31, 2014 Author Posted January 31, 2014 Check this out:https://wiki.multitheftauto.com/wiki/Cl ... _Functions https://wiki.multitheftauto.com/wiki/Se ... _Functions no which i post script which file is server and client side
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