Gtagasje Posted October 21, 2011 Share Posted October 21, 2011 Hello again, You guys helped me alot with the job gui, and I'm very thankfull for that, but, now I added it to a another marker also, to test if that would work, it shows a error about the syntax @ line 57 or 58.. This is the script: Client: local dutyMarker = createMarker ( 1547.88953, -1681.53955, 12.5, 'cylinder', 2.0, 0, 0, 225, 132 ) function createCopGui ( hitElement ) PoliceGui = guiCreateWindow(227,106,342,376,"MLAW Police job",false) Have_Job = guiCreateButton(39,313,111,45,"Have job!",false,PoliceGui) Cancel = guiCreateButton(200,312,111,45,"Cancel",false,PoliceGui) Doel = guiCreateMemo(63,44,234,242,"Police Job:\nAs police you will have a hourly payment. Further objectves comming soon!",false,PoliceGui) guiMemoSetReadOnly( Doel,true ) end addEventHandler("onClientMarkerHit", dutyMarker, function(hitElement) if hitElement == localPlayer then createCopGui ( hitElement ) if (PoliceGui ~= nil) then guiSetVisible(PoliceGui, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox ("The police doesn't want you. Please re-enter the marker.") end end end ) function PoliceTeam(button,state) if (source == Have_Job) then triggerServerEvent("PoliceTeam",localPlayer) guiSetInputEnabled(false) guiSetVisible(CopGui, false) showCursor(false) elseif (source == Cancel) then guiSetInputEnabled(false) guiSetVisible(PoliceGui, false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, PoliceTeam) Server: local Police = createTeam ("Police", 0, 0, 255) function SetPlayerPolice() setPlayerTeam (source, getTeamFromName("Police")) setPlayerSkin (source, 280) end addEvent("PoliceTeam",true) addEventHandler("PoliceTeam", root, SetPlayerPolice) Link to comment
Gtagasje Posted October 21, 2011 Author Share Posted October 21, 2011 Oh. and setplayerskin I have already replaced with setelementmodel. Link to comment
12p Posted October 21, 2011 Share Posted October 21, 2011 58 = guiSetVisible(CopGui, false) PoliceGui = guiCreateWindow(227,106,342,376,"MLAW Police job",false) You see the problem? Link to comment
Gtagasje Posted October 21, 2011 Author Share Posted October 21, 2011 Ah, yes. I think I didn't though and added the function there. Thx 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