nasserdfdd Posted June 18, 2015 Share Posted June 18, 2015 hey all so i need a script which should be a cylinder when i enter it a gui will open with two butoons accept and close so if u accept it will set team and roll police or anything i can change if some one can make for free or paid but prefered for free thanks for ur patience Link to comment
Mr.unpredictable. Posted June 18, 2015 Share Posted June 18, 2015 Why do you want to pay some one for that, you can do it by yourself it's not that hard. Link to comment
nasserdfdd Posted June 18, 2015 Author Share Posted June 18, 2015 ok can u make it for mei really can't make it Link to comment
Walid Posted June 18, 2015 Share Posted June 18, 2015 ok can u make it for mei really can't make it Try to do it by yourself then post your code here and we will help you. Link to comment
Mr_Moose Posted June 18, 2015 Share Posted June 18, 2015 Take a look at GTWcivilians, a type of job system which you may use as source for inspiration: https://github.com/GTWCode/GTW-RPG/tree/master/%5Bresources%5D/GTWcivilians Also, this isn't a request section, you can ask for help if you face any issues however, good luck. Link to comment
HUNGRY:3 Posted June 18, 2015 Share Posted June 18, 2015 it's not that hard... here you go.. SERVER SIDE local marker = createMarker ( 476.0654296875, -1765.6552734375, 14.117799758911, "cylinder", 1.5, 255, 255, 0, 170 ) function openwindow(hitPlayer) triggerClientEvent (hitPlayer,"showwin",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker,openwindow) createTeam("Police", 255, 0, 0) function policeman() local policeteam = getTeamFromName("Police") setPlayerTeam ( source, policeteam ) outputChatBox("You're Now A Police Man!",source,255,0,0) end addEvent( "setTeamNow", true ) addEventHandler( "setTeamNow", root, policeman ) CLIENT SIDE GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(589, 389, 520, 321, "Want To Be A Police Man?", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(9, 32, 501, 107, "ACCEPT", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 204, 501, 107, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") end ) function showwindow() guiSetVisible(GUIEditor.window[1],true) showCursor(true) end addEvent("showwin",true) addEventHandler("showwin", getRootElement(), showwindow) function closewindow() if source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler("onClientGUIClick", root, closewindow) function setpolice() if source == GUIEditor.button[1] then triggerServerEvent ("setTeamNow",localPlayer) end end addEventHandler("onClientGUIClick", root, setpolice) tested and it works 100% 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