Jump to content

mint3d

Members
  • Posts

    425
  • Joined

  • Last visited

Everything posted by mint3d

  1. mint3d

    Need help fast

    Works thanks bro
  2. mint3d

    Need help fast

    i was on FBI team
  3. mint3d

    Need help fast

    still dont open gui
  4. mint3d

    Need help fast

    any of these getPlayerTeam getTeamName
  5. mint3d

    Need help fast

    mark does not open no
  6. mint3d

    Need help fast

    now we FBI cant open gui
  7. mint3d

    Need help fast

    and we cant take job either when in team FBI
  8. mint3d

    Need help fast

    ok i done but when anyone walks in to it everyone can see
  9. mint3d

    Need help fast

    i put that where
  10. I have made a job but i want it so only people in the team can take it Client; local marker = createMarker( 825.55047607422, -2058.07934570311, 11.8671875, "Cylinder", 1.4, 0, 0, 255, 255) 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(301,170,"[sGN] FBI Team ") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,80,108,35,"Take job",false,windowjob) GUIEditor_Button[3] = guiCreateButton(22,120,108,35,"Quit Job",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,120,110,36,"Cancel",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(19,33,273,20,"Are you sure you want to take/leave this job?",false,windowjob) function FBIjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, FBIjob) 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, FBIjobleave) function joinTeam() triggerServerEvent("setFBI",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removeFBI",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3] , removeTeam, false) function removeFBIWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeFBIWindow, false) Server; function createFBITeam () FBIteam = createTeam ("FBI", 196, 196, 196) end addEventHandler ("onResourceStart", resourceRoot, createFBITeam) function joinFBI() setPlayerTeam(source,FBIteam) setElementModel(source, 286) giveWeapon ( source, 3 ) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "FBI", true ) outputChatBox("You are now FBI.",source,196,196,196) end addEvent("setFBI", true) addEventHandler("setFBI",root,joinFBI) function removeFBI() setPlayerTeam(source, 0) playeraccount = getPlayerAccount(source) if getAccountData(playeraccount, "standardskin") == 0 then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end outputChatBox("You are now an unemployed.",source,255,0,0) end addEvent("removeFBI", true) addEventHandler("removeFBI",root,removeFBI) function FBIJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 60 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 60000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob)
  11. Ok i made my self a job for FBI but i want it so only people in FBI team can take it Client local marker = createMarker( 825.55047607422, -2058.07934570311, 11.8671875, "Cylinder", 1.4, 0, 0, 255, 255) 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(301,170,"[sGN] FBI Team ") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,80,108,35,"Take job",false,windowjob) GUIEditor_Button[3] = guiCreateButton(22,120,108,35,"Quit Job",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,120,110,36,"Cancel",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(19,33,273,20,"Are you sure you want to take/leave this job?",false,windowjob) function FBIjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, FBIjob) 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, FBIjobleave) function joinTeam() triggerServerEvent("setFBI",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removeFBI",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3] , removeTeam, false) function removeFBIWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeFBIWindow, false) Server function createFBITeam () FBIteam = createTeam ("FBI", 196, 196, 196) end addEventHandler ("onResourceStart", resourceRoot, createFBITeam) function joinFBI() setPlayerTeam(source,FBIteam) setElementModel(source, 286) giveWeapon ( source, 3 ) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "FBI", true ) outputChatBox("You are now FBI.",source,196,196,196) end addEvent("setFBI", true) addEventHandler("setFBI",root,joinFBI) function removeFBI() setPlayerTeam(source, 0) playeraccount = getPlayerAccount(source) if getAccountData(playeraccount, "standardskin") == 0 then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end outputChatBox("You are now an unemployed.",source,255,0,0) end addEvent("removeFBI", true) addEventHandler("removeFBI",root,removeFBI) function FBIJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 60 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 60000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob)
  12. can you help me do you have skype
  13. whats that i want like so a gang has a marker in there base and they walk in opens a gui and the pick between some cars then the pick it spawns them in it
  14. that is not what i am looking for what i want is like CSG and CIT like the Car spawner were you pick the car you want
  15. i am not a scripter i know some stuff
  16. no i didn't does it create a marker so like a gang can use it
  17. yes
  18. how can i make it so i can pick a car with a gui
  19. how do i pick the car i want with a gui
  20. no i mean open a gui so i can pick the car
  21. will that open a gui
  22. i need help with my script i want to make it so you pick the car. Instead of it randomly giving you one Client Client][ Color = {255,0,0} currentPosition = {} local Key = "z" local render = false GUIEditor = { combobox = {}, button = {}, edit = {}, label = {}, } System = {} itemTextCombobox = {"Arabic|العربية","English","Italiano","Français","Español"} local X, Y = guiGetScreenSize() System.wnd = guiCreateWindow(X-343, Y/2-269/2, 333, 269, ".:: [ Vehicle Marker Creator System ] ::.", false) guiSetVisible(System.wnd, not guiGetVisible(System.wnd)) guiWindowSetMovable(System.wnd, false) guiWindowSetSizable(System.wnd, false) guiSetAlpha(System.wnd, 1.00) guiSetProperty(System.wnd, "CaptionColour", "FF00D2F8") GUIEditor.label[1] = guiCreateLabel(7, 27, 415, 25, "Welcome To Vehicle Marker System ( =", false, System.wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 248, 0, 0) GUIEditor.label[2] = guiCreateLabel(11, 59, 111, 25, "Position :", false, System.wnd) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 240, 237, 7) GUIEditor.label[3] = guiCreateLabel(11, 92, 118, 21, "x", false, System.wnd) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 99, 244, 2) GUIEditor.edit[1] = guiCreateEdit(9, 115, 130, 19, "", false, System.wnd) GUIEditor.label[4] = guiCreateLabel(10, 140, 118, 21, "y", false, System.wnd) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 99, 244, 2) GUIEditor.edit[2] = guiCreateEdit(10, 167, 130, 19, "", false, System.wnd) GUIEditor.label[5] = guiCreateLabel(10, 192, 118, 21, "z", false, System.wnd) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 99, 244, 2) GUIEditor.edit[3] = guiCreateEdit(10, 213, 130, 17, "", false, System.wnd) GUIEditor.label[6] = guiCreateLabel(148, 59, 125, 23, "Language :", false, System.wnd) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 241, 232, 4) GUIEditor.combobox[1] = guiCreateComboBox(148, 92, 171, 100, "", false, System.wnd) for i = 1, #itemTextCombobox do guiComboBoxAddItem(GUIEditor.combobox[1], itemTextCombobox[i]) end GUIEditor.button[1] = guiCreateButton(146, 129, 175, 22, "Get Position", false, System.wnd) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF5CF202") GUIEditor.button[2] = guiCreateButton(148, 161, 175, 22, "Set Marker Color", false, System.wnd) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00ACF4") GUIEditor.button[3] = guiCreateButton(150, 202, 173, 22, "Create Marker", false, System.wnd) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFF40000") GUIEditor.button[4] = guiCreateButton(298, 21, 26, 29, "X", false, System.wnd) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFF40000") GUIEditor.label[7] = guiCreateLabel(9, 242, 322, 21, "Vehicle Marker Creator System v.2", false, System.wnd) guiSetFont(GUIEditor.label[7], "default-bold-small") guiLabelSetColor(GUIEditor.label[7], 30, 213, 207) for k, v in pairs( GUIEditor.edit ) do guiEditSetReadOnly( v, true ) end addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor.button[2] ) then openColorPicker() elseif ( source == GUIEditor.button[1] ) then local x,y,z = getElementPosition(localPlayer) guiSetText (GUIEditor.edit[1], x ) guiSetText (GUIEditor.edit[2], y ) guiSetText (GUIEditor.edit[3], z ) currentPosition = {x,y,z} elseif ( source == GUIEditor.button[3] ) then if #currentPosition == 0 then return end local send = { [1] = currentPosition[1], [2] = currentPosition[2], [3] = currentPosition[3], [4] = Color[1], [5] = Color[2], [6] = Color[3], } newPos = {} triggerServerEvent("CreateMarker", localPlayer, unpack(send)) elseif ( source == GUIEditor.button[4] ) then guiSetVisible(System.wnd, not guiGetVisible(System.wnd)) showCursor(guiGetVisible(System.wnd)) if render then openColorPicker() end end end ) addEventHandler ( "onClientGUIComboBoxAccepted", guiRoot, function ( combo ) if ( combo == GUIEditor.combobox[1] ) then local text = tostring ( guiComboBoxGetItemText ( combo, guiComboBoxGetSelected ( combo ) ) ) if ( text ) then local lang = AddLanguage( text ) for k, v in pairs ( lang ) do guiSetText( v.element, v.id) end end end end ) bindKey (Key, "down", function() if getElementData( localPlayer, 'OpenMakerPanel') ~= nil then guiSetVisible(System.wnd, not guiGetVisible(System.wnd)) showCursor(guiGetVisible(System.wnd)) if render then openColorPicker() end end end ) addEvent( 'LogOutSetVisible', true ) addEventHandler( 'LogOutSetVisible', root, function() if guiGetVisible(System.Wnd) then guiSetVisible( System.Wnd, false ) showCursor( false ) end end) function openColorPicker() if render then colorPicker.closeSelect() removeEventHandler("onClientRender", root, updateColor) else colorPicker.openSelect() addEventHandler("onClientRender", root, updateColor) end render = not render end function updateColor() if (not colorPicker.isSelectOpen) then return end local r, g, b = colorPicker.updateTempColors() Color = {r,g,b} end Server rRoot = getResourceRootElement(getThisResource()) Cars = {} antiFloodMarker = {} local cmd = 'RemoveMarker' --- Delete Marker Command local allowedGroup = 'Admin' local vehicleIDS = { -- Vehicle ID 415,561,587,541,527,480,603 } addEventHandler( 'onResourceStart', rRoot, function( ) executeSQLQuery( 'CREATE TABLE IF NOT EXISTS Marker_System ( posX, posY, posZ, r, g, b, ID)' ) for i, player in ipairs( getElementsByType( 'player' ) ) do if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( allowedGroup ) ) then setElementData( player, 'OpenMakerPanel', true) else setElementData( player, 'OpenMakerPanel', nil) end end creatMarkerSystem() end ) function creatMarkerSystem() local GetAllMarker = executeSQLQuery( "SELECT * FROM Marker_System" ) if ( type ( GetAllMarker ) == "table" and #GetAllMarker > 0 ) then for i = 1, #GetAllMarker do local n = {GetAllMarker[i]["posX"], GetAllMarker[i]["posY"], GetAllMarker[i]["posZ"], GetAllMarker[i]["r"], GetAllMarker[i]["g"],GetAllMarker[i]["b"]} for ii = 1, #n do n[ ii ] = tonumber( n[ ii ] ) end local marker = createMarker( n[1], n[2], n[3], 'cylinder', 1.25, n[4], n[5], n[6], 255 ) setElementData( marker, 'id', i ) setElementData( marker, 'giveCarSystem', true ) end end end addEventHandler( 'onMarkerHit', rRoot, function( player ) if getElementType( player ) == 'player' and not getPedOccupiedVehicle( player ) then if getElementData( source, 'giveCarSystem' ) then randomCarID = tonumber(vehicleIDS[math.random(#vehicleIDS)]) if Cars[player] and getElementType(Cars[player]) == "vehicle" then destroyElement(Cars[player]) end x,y,z = getElementPosition(player) Cars[player] = createVehicle(randomCarID, x+1,y,z) if Cars[player] then warpPedIntoVehicle(player,Cars[player]) end end end end) addEventHandler( 'onPlayerJoin', root, function() setElementData( source, 'OpenMakerPanel', nil) end ) addEventHandler( 'onPlayerLogin', root, function( _, acc ) if isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( allowedGroup ) ) then setElementData( source, 'OpenMakerPanel', true) else setElementData( source, 'OpenMakerPanel', nil) end end ) addEventHandler( 'onPlayerLogout', root, function( _, acc ) triggerClientEvent( source, 'LogOutSetVisible', root) setElementData( source, 'OpenMakerPanel', nil) end ) addEvent( 'CreateMarker', true ) addEventHandler( 'CreateMarker', root, function( X, Y, Z, r, g, b) if antiFloodMarker[source] then return outputChatBox( "Please wait 6 seconds before creating new marker", source, 255, 255, 0 ) end antiFloodMarker[source] = true if getPedOccupiedVehicle( source ) then Z = Z else Z = Z - 1 end local AllMarker = executeSQLQuery( "SELECT * FROM Marker_System" ) id = #AllMarker + 1 executeSQLQuery( "INSERT INTO Marker_System ( posX, posY, posZ, r, g, b, ID ) VALUES ( "..X..", "..Y..", "..Z..", "..r..", "..g..", "..b..", "..id..")" ) local marker = createMarker( X, Y, Z, 'cylinder', 1.25, r, g, b, 255 ) setElementData( marker, 'giveCarSystem', true ) setElementData( marker, 'id', id ) outputChatBox( "Marker Was Created", source, 255, 255, 0 ) setTimer(removeFlood, 6000, 1, source) end ) function removeFlood(plr) if antiFloodMarker[plr] then antiFloodMarker[plr] = false end end addEventHandler("onPlayerQuit",root,function() if Cars[source] then destroyElement(Cars[source]) Cars[source] = nil end end) addEventHandler("onVehicleExplode",root,function() setTimer(destroyElement,2000,1,source) end) addCommandHandler( cmd, function(player, Command) if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( allowedGroup ) ) then local mrker = getMarkerByHit( player ) if mrker then local id = tonumber ( getElementData( mrker, 'id') or 0 ) if id == 0 then return end if executeSQLQuery("DELETE FROM `Marker_System` WHERE `ID`=?", id) then destroyElement( mrker ) outputChatBox( "Marker Was Deleted", player, 255, 255, 0 ) else outputChatBox( "error", player, 255, 255, 0 ) end end else outputChatBox( "Access denied", player, 255, 255, 0 ) end end ) function getMarkerByHit( plr ) for i, v in ipairs( getElementsByType( 'marker', rRoot ) ) do if isElementWithinMarker(plr, v) then return v end end return false,outputChatBox( "Error: Please enter the marker", plr, 255, 255, 0 ) end
  23. mint3d

    Cant host game

    its ok it worked
  24. mint3d

    Cant host game

    i can host a game and it says see console
×
×
  • Create New...