Mert. Posted October 14, 2012 Posted October 14, 2012 Hey , I tried to make Job marker special for Groups , But didnt woork , here local marker = createMarker(1289.0939941406, -1647.5231933594, 12.546875, "Cylinder", 1.8, 0, 0, 57, 150) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(332,350,"SWAT") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,280,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,280,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,320,200,"SWAT Team\n\",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function SWATjob(hitElement) if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWATjob) function SWATjobLeave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) srcmta.net
TwiX! Posted October 14, 2012 Posted October 14, 2012 Hey , I tried to make Job marker special for Groups , But didnt woork , here local marker = createMarker(1289.0939941406, -1647.5231933594, 12.546875, "Cylinder", 1.8, 0, 0, 57, 150) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(332,350,"SWAT") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,280,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,280,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,320,200,"SWAT Team",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function SWATjob(hitElement) if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWATjob) function SWATjobLeave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) Where is "getPlayerGang" function - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
Mert. Posted October 14, 2012 Author Posted October 14, 2012 function SWATjob(hitElement) if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then srcmta.net
TwiX! Posted October 14, 2012 Posted October 14, 2012 function SWATjob(hitElement) if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then .. Where is function getPlayerGang(player) --something here end please use [lua] [ /lua] tags - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
TwiX! Posted October 14, 2012 Posted October 14, 2012 can you edit it lol local marker = createMarker(1289.0939941406, -1647.5231933594, 12.546875, "Cylinder", 1.8, 0, 0, 57, 150) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(332,350,"SWAT") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,280,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,280,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,320,200,"SWAT Team",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function SWATjob(hitElement) if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWATjob) function SWATjobLeave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) function getPlayerGang(player) return getPlayerTeam(player); end - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
TwiX! Posted October 14, 2012 Posted October 14, 2012 show /debugscript 3 show server-side - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
TwiX! Posted October 14, 2012 Posted October 14, 2012 local jMarker = createMarker(1289.0939941406, -1647.5231933594, 12.546875, "Cylinder", 1.8, 0, 0, 57, 150); GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(332,350,"SWAT") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,280,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,280,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,320,200,"SWAT Team",false,windowjob) guiMemoSetReadOnly(GUIEditor_Memo[1],true) function SWATjob(hitElement) if source == jMarker then if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob,true); showCursor(true); end end end end addEventHandler("onClientMarkerHit",getRootElement(),SWATjob) function SWATjobLeave(leaveElement) if source == jMarker then if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob,false); showCursor(false); end end end end addEventHandler("onClientMarkerLeave",getRootElement(),SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) function getPlayerGang(player) return getPlayerTeam(player); end - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
Mert. Posted October 14, 2012 Author Posted October 14, 2012 same now 18 38 42 . lines are pwned srcmta.net
TwiX! Posted October 14, 2012 Posted October 14, 2012 (edited) found errors local x,y = guiGetScreenSize(); local jMarker = createMarker(1289.0939941406, -1647.5231933594, 12.546875, "Cylinder", 1.8, 0, 0, 57, 150); local sizeX,sizeY = 332,350; local jX,jY = x/2 - sizeX/2,y/2 - sizeY/2; GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} windowjob = guiCreateWindow(jX,jY,sizeX,sizeY,"SWAT",false); guiSetVisible(windowjob,false) GUIEditor_Button[1] = guiCreateButton(22,280,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,280,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,320,200,"SWAT Team",false,windowjob) guiMemoSetReadOnly(GUIEditor_Memo[1],true) function SWATjob(hitElement) if source == jMarker then if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob,true); showCursor(true); end end end end addEventHandler("onClientMarkerHit",getRootElement(),SWATjob) function SWATjobLeave(leaveElement) if source == jMarker then if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob,false); showCursor(false); end end end end addEventHandler("onClientMarkerLeave",getRootElement(),SWATjobLeave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) function getPlayerGang(player) return getPlayerTeam(player); end Edited October 14, 2012 by Guest - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
TwiX! Posted October 14, 2012 Posted October 14, 2012 ? see my post - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
TwiX! Posted October 14, 2012 Posted October 14, 2012 local x,y = guiGetScreenSize(); local jMarker = createMarker(1289.0939941406, -1647.5231933594, 12.546875, "Cylinder", 1.8, 0, 0, 57, 150); local sizeX,sizeY = 332,350; local jX,jY = x/2 - sizeX/2,y/2 - sizeY/2; GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} windowjob = guiCreateWindow(jX,jY,sizeX,sizeY,"SWAT",false); guiSetVisible(windowjob,false) GUIEditor_Button[1] = guiCreateButton(22,280,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,280,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,320,200,"SWAT Team",false,windowjob) guiMemoSetReadOnly(GUIEditor_Memo[1],true) function SWATjob(hitElement) if source == jMarker then if getPlayerGang(hitElement) == "SWAT" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob,true); showCursor(true); end end end end addEventHandler("onClientMarkerHit",getRootElement(),SWATjob) function SWATjobLeave(leaveElement) if source == jMarker then if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob,false); showCursor(false); end end end end addEventHandler("onClientMarkerLeave",getRootElement(),SWATjobLeave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) function getPlayerGang(player) local team = getPlayerTeam(player); return getTeamName(team); end 100% Work - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
Mert. Posted October 14, 2012 Author Posted October 14, 2012 why it doesnt works for me Still same srcmta.net
Mossy Posted October 14, 2012 Posted October 14, 2012 why it doesnt works for me Still same Copy the code and paste it. Refresh your server. Also make sure the file is in the Meta.xml.
TwiX! Posted October 14, 2012 Posted October 14, 2012 why it doesnt works for me Still same Copy my code Paste in your own script do /restart YOUR SCRIPT NAME about meta don't forget about type="client" Set yourself a team (can with admin panel) if you don't have this team, create it with name "SWAT" - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
Castillo Posted October 14, 2012 Posted October 14, 2012 He's using my gang system, which means he's not using teams as "groups". function getPlayerGang(player) local team = getPlayerTeam(player); return getTeamName(team); end Should be: function getPlayerGang ( player ) return getElementData ( player, "gang" ) end San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
illestiraqi Posted March 5, 2013 Posted March 5, 2013 May I please have permission to use this script please?
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