Jump to content

[UCG]Mike

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by [UCG]Mike

  1. local join = createMarker ( 2348.09, 2455.07, 13.97, "cylinder", 2, 67, 156, 252 ) local join1 = createMarker ( -2161.64, -2385.5, 29.62, "cylinder", 2, 67, 156, 252 ) local join2 = createMarker ( 1574.700, -1634.300, 12.600, "cylinder", 2, 67, 156, 252 ) local join3 = createMarker ( 630.84, -569.06, 15.33, "cylinder", 2, 67, 156, 252 ) local join4 = createMarker ( -1622.52, 686.91, 6.18, "cylinder", 2, 67, 156, 252 ) myFont = dxCreateFont( "SF Automaton Bold.ttf", 20 ) -- Create custom font GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_gridlist = {} windowjob = guiCreateWindow(392, 176, 408, 437, "CNG ~ Police", false) guiWindowSetSizable(windowjob, false) guiSetVisible(windowjob, false) GUIEditor_Memo[1] = guiCreateMemo(18, 30, 362, 221, "Here you can join the police service.\n\nPolice officer job is all about arresting wanted players. You can pick one of 8 various skins and 4 different types of police vehicles. When you get enough arrests you will be able to get promoted and become one of the special ranks in police job. Also good progress as a police officer can lead to joining one of the special government services. \n\nJob perk: To arrest players simply hit them with a nighstick. You can also use tazer to stun them. The player is wanted if he has numbers (1-6) behind his name.\n", false, windowjob) guiMemoSetReadOnly(GUIEditor_Memo[1], true) GUIEditor_gridlist[1] = guiCreateGridList(21, 264, 359, 115, false, windowjob) guiGridListAddColumn(GUIEditor_gridlist[1], "ID", 0.5) guiGridListAddColumn(GUIEditor_gridlist[1], "Skin Name", 0.5) for i = 1, 5 do guiGridListAddRow(GUIEditor_gridlist[1]) end guiGridListSetItemText(GUIEditor_gridlist[1], 0, 1, "265", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 0, 2, "Cop 1", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 1, 1, "266", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 1, 2, "Cop 2", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 2, 1, "267", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 2, 2, "Cop 3", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "280", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 4", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "281", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 5", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "281", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 6", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "282", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 7", false, false) GUIEditor_Button[1] = guiCreateButton(21, 379, 175, 48, "Take job !", false, windowjob) GUIEditor_Button[2] = guiCreateButton(206, 379, 174, 48, "Cancel", false, windowjob) function SAPDjob(hitElement) getElementData (source, "NameGroup" , SWAT ) setElementData ( localPlayer, "ownskin", getElementModel (localPlayer) ) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", join, SAPDjob) addEventHandler("onClientMarkerHit", join1, SAPDjob) addEventHandler("onClientMarkerHit", join2, SAPDjob) addEventHandler("onClientMarkerHit", join3, SAPDjob) addEventHandler("onClientMarkerHit", join4, SAPDjob) function FBIjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SAPDjobleave) function setskintest() local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) setElementModel ( localPlayer, skin ) end addEventHandler ( "onClientGUIClick", GUIEditor_gridlist[1], setskintest, false ) function joinTeam() triggerServerEvent("Police",localPlayer) local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) if skin ~= 0 or getElementData(localPlayer, "ownskin") then guiSetVisible(windowjob, false) showCursor(false) setElementModel ( localPlayer, skin ) else exports["TopBarChat"]:sendClientMessage ("You didn't select a Skin", 255, 0, 0 ) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSAPDWindow() guiSetVisible(windowjob, false) showCursor(false) setElementModel(localPlayer, getElementData(localPlayer, "ownskin")) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindow, false) Dont work
  2. https://community.multitheftauto.com/ind ... ls&id=9171
  3. hey guys ... how i cant create job Ex ( SWAT ) by Group local join = createMarker ( 2348.09, 2455.07, 13.97, "cylinder", 2, 67, 156, 252 ) local join1 = createMarker ( -2161.64, -2385.5, 29.62, "cylinder", 2, 67, 156, 252 ) local join2 = createMarker ( 1574.700, -1634.300, 12.600, "cylinder", 2, 67, 156, 252 ) local join3 = createMarker ( 630.84, -569.06, 15.33, "cylinder", 2, 67, 156, 252 ) local join4 = createMarker ( -1622.52, 686.91, 6.18, "cylinder", 2, 67, 156, 252 ) myFont = dxCreateFont( "SF Automaton Bold.ttf", 20 ) -- Create custom font GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_gridlist = {} windowjob = guiCreateWindow(392, 176, 408, 437, "CNG ~ Police", false) guiWindowSetSizable(windowjob, false) guiSetVisible(windowjob, false) GUIEditor_Memo[1] = guiCreateMemo(18, 30, 362, 221, "Here you can join the police service.\n\nPolice officer job is all about arresting wanted players. You can pick one of 8 various skins and 4 different types of police vehicles. When you get enough arrests you will be able to get promoted and become one of the special ranks in police job. Also good progress as a police officer can lead to joining one of the special government services. \n\nJob perk: To arrest players simply hit them with a nighstick. You can also use tazer to stun them. The player is wanted if he has numbers (1-6) behind his name.\n", false, windowjob) guiMemoSetReadOnly(GUIEditor_Memo[1], true) GUIEditor_gridlist[1] = guiCreateGridList(21, 264, 359, 115, false, windowjob) guiGridListAddColumn(GUIEditor_gridlist[1], "ID", 0.5) guiGridListAddColumn(GUIEditor_gridlist[1], "Skin Name", 0.5) for i = 1, 5 do guiGridListAddRow(GUIEditor_gridlist[1]) end guiGridListSetItemText(GUIEditor_gridlist[1], 0, 1, "265", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 0, 2, "Cop 1", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 1, 1, "266", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 1, 2, "Cop 2", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 2, 1, "267", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 2, 2, "Cop 3", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "280", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 4", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "281", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 5", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "281", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 6", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 1, "282", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 3, 2, "Cop 7", false, false) GUIEditor_Button[1] = guiCreateButton(21, 379, 175, 48, "Take job !", false, windowjob) GUIEditor_Button[2] = guiCreateButton(206, 379, 174, 48, "Cancel", false, windowjob) function SAPDjob(hitElement) setElementData ( localPlayer, "ownskin", getElementModel (localPlayer) ) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", join, SAPDjob) addEventHandler("onClientMarkerHit", join1, SAPDjob) addEventHandler("onClientMarkerHit", join2, SAPDjob) addEventHandler("onClientMarkerHit", join3, SAPDjob) addEventHandler("onClientMarkerHit", join4, SAPDjob) function FBIjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SAPDjobleave) function setskintest() local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) setElementModel ( localPlayer, skin ) end addEventHandler ( "onClientGUIClick", GUIEditor_gridlist[1], setskintest, false ) function joinTeam() triggerServerEvent("Police",localPlayer) local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) if skin ~= 0 or getElementData(localPlayer, "ownskin") then guiSetVisible(windowjob, false) showCursor(false) setElementModel ( localPlayer, skin ) else exports["TopBarChat"]:sendClientMessage ("You didn't select a Skin", 255, 0, 0 ) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSAPDWindow() guiSetVisible(windowjob, false) showCursor(false) setElementModel(localPlayer, getElementData(localPlayer, "ownskin")) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindow, false) function createSAPDTeam () PoliceTeam = createTeam ("Police", 0, 128, 255) end function joincriminal() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then local wlevel = getPlayerWantedLevel( source ) end end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD() setPlayerNametagColor ( source, 0, 128, 255 ) setPlayerTeam(source,PoliceTeam) exports["DENdxmsg"]:sendClientMessage ("You are now Police Officer", source, 0, 255, 0, true, 8 ) setElementFrozen ( ped, true ) setElementHealth ( ped, 180 ) giveWeapon ( source, 3 ) setElementData( source, "Occupation", "Police Officer", true ) setElementData ( source, "Rank", "Federal Agent" ) end addEvent("Police", true) addEventHandler("Police",root,joinSAPD)
  4. lol nothing im waiting Anubhav to tell me
  5. are you kidding me its Marker not col
  6. https://community.multitheftauto.com/ind ... ls&id=9171
  7. checkGateMarker = createMarker ( 216.22926330566, 1875.0806884766, 7.4616560935974, "corona", 10.0, 0, 0, 255, 0 ) function onPoliceShapeHit ( thePlayer, matchingDimension ) if ( getElementType ( thePlayer ) == "player" ) then outputChatBox ( "You have entered Police Base zone!", thePlayer, 0, 0, 255 ) end end addEventHandler ( "onColShapeHit", policeColShape, onPoliceShapeHit ) function createGate () gatePolice = createObject ( 976, 209.8828125, 1875.8419189453, 12.372331619263 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) function gateCheckingTeam ( thePlayer, matchingDimension ) moveObject ( gatePolice, 976, 218.11740112305, 1875.3406982422, 12.372331619263 ) end addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) function onLeave ( thePlayer, matchingDimension ) setTimer ( movingBackPolice, 3000, 1, thePlayer ) end addEventHandler ( "onMarkerLeave", checkGateMarker, onLeave ) function movingBackPolice () moveObject ( gatePolice, 3000, 209.8828125, 1875.8419189453, 12.372331619263 ) end hey guys im new here i need help: How to edt this gate to open by groups ( Group System )
×
×
  • Create New...