Jump to content

orcun99

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by orcun99

  1. This is my code vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be toggleVehicleRespawn ( vehicle1 , true ) setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) setVehicleDamageProof ( vehicle, true ) -----car won't take damage (change it to false if you want to take damage) function lockPrivate( player, seat, jacked ) if ( source == vehicle1 ) then if ( seat ~= 0 ) then -- If the seat isn't '0' ( driver's seat ) return -- Stop the function from executing. end local playerTeam = getPlayerTeam ( player ) local oldTeamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( oldTeamName ~= "Admins" ) then cancelEvent ( ) exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", 255, 190, 0, player) else exports.ORCcommands:sendMessage("Tekrar Hoşgeldin Admin Bey", 255, 255, 0, player) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) my code lock for team I would like to have this code for the class I need lock for class my english bad sory class lock p
  2. 1.vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be 2.toggleVehicleRespawn ( vehicle1 , true ) 3.setVehicleRespawnDelay ( vehicle1 , 10000) 4.setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- 5.vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) 6.state = setVehicleDoorState ( vehicle, 1, 1 ) 7.setVehicleDamageProof ( vehicle, true ) -----car won't take damage (change it to false if you want to take damage) 8. 9.function lockPrivate( player, seat, jacked ) 10. if ( source == vehicle1 ) then 11. if ( seat ~= 0 ) then -- If the seat isn't '0' ( driver's seat ) 12. return -- Stop the function from executing. 13. end 14. 15. local playerTeam = getPlayerTeam ( player ) 16. local oldTeamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) 17. if ( oldTeamName ~= "Admins" ) then 18. cancelEvent ( ) 19.exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", GetLocalPlayer, 255, 190, 0, source) 20. else 21.exports.ORCcommands:sendMessage("Tekrar Hoşgeldin Admin Bey.", GetLocalPlayer, 255, 190, 0, source) 22. end 23. end 24.end 25.addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) I want it to be in the form of guar but I can not gui you make me this code gui accounted Can you give me? gui version of this code I want to make gui: x, y, z team messege my english bad sory
  3. orcun99

    Help PLs

    I am not understand my server gamemode is : rpg
  4. orcun99

    Help PLs

    I "orccommand" I want the message to be sent I have given in the code base, but as in most of the top players going to give you all that I write in code I use google transtle
  5. orcun99

    Help PLs

    I can do it I'm trying to "exports. commands: SendMessage" want to do this using the command
  6. orcun99

    Help PLs

    Even though I'm on the team now, admins can not ride vehicles
  7. orcun99

    Help PLs

    I tried your code I did not specify the coordinates vehicle
  8. orcun99

    Help PLs

    vehicle does not vehicle not create
  9. orcun99

    Help PLs

    warning line 9 bad "ped" pointer @ "ispedinvehicle" <1> means everyone can ride and articles still everyone is going to
  10. orcun99

    Help PLs

    vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be toggleVehicleRespawn ( vehicle1 , true ) setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) setVehicleDamageProof ( vehicle, true ) -----car won't take damage (change it to false if you want to take damage) function lockPrivate( player, seat, jacked ) if ( source == vehicle1 ) then if ( seat ~= 0 ) then -- If the seat isn't '0' ( driver's seat ) return -- Stop the function from executing. end local playerTeam = getPlayerTeam ( player ) local oldTeamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( oldTeamName ~= "Admins" ) then cancelEvent ( ) exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", GetLocalPlayer, 255, 190, 0, source) else exports.ORCcommands:sendMessage("Tekrar Hoşgeldin Admin Bey.", GetLocalPlayer, 255, 190, 0, source) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate, GetLocalPlayer ) send a message to all players at the person who is sending it just got in the car How do I set? exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", GetLocalPlayer, 255, 190, 0, source) I am english very bad Post only want to get into the car to go to the people message goes to all players now
  11. this script is not mine I bought from a server that person the script is working fine but my serverimiz I do not work I get people work told him, but works for me something Sorry I said, this site gave you help said
  12. Can you give me again please correct this file link: https://www.mediafire.com/?poezma4z9du6969
  13. RPGpolice/wantedlevel.lua:160: attempt to compare number with nil
  14. getWantedLevel changed getPlayerWantedLevel
  15. I do not understand much of the script coding SALE OF me a script that my friend does not work, but all the code is correct if you write to me again, it would be better unfortunately I do not understand much that I gave you fix the code rewrite would be very happy if my english is not too good thanks
  16. Erorr: RPGPolice/jail_server.lua:35: attempt to perform aritmethic on local "crimwanted" < a nil value> 35: local(jailTime = crimWanted * 15)
  17. wantedlevel.lua local wantedLevel = {} local wantedLevelTimer = {} local newWantedTimer = {} local injail = {} addEvent("onPlayerWantedLevelChange", true) function startWantedLevel() for k, v in ipairs(getElementsByType("player")) do local account = getPlayerAccount(v) if account then local wlevel = 0 if getElementData(v,"wanted") then wlevel = getElementData(v,"wanted") else wlevel = getAccountData(account, "wanted") or 0 end setElementData(v,"damAttacked","no") setWantedLevel(v,wlevel) setPlayerNametagText(v,getPlayerName(v).."["..tostring(wlevel).."]") end end end function setWantedLevel(thePlayer, level) local wl = getWantedLevel(thePlayer) or 0 if thePlayer and level and wl and (tonumber(level) >= 0 and tonumber(level) <= 24 and wl >= 0 and wl <= 24) then --and sendTheEvents(thePlayer, level) Stops people in jail from loosing stars! wantedLevel[thePlayer] = tonumber(level) setElementData(thePlayer,"wanted",tostring(level)) setPlayerNametagText(thePlayer, getPlayerName(thePlayer).."["..tostring(level).."]") if tonumber(level) ~= 0 then setWantedTimer(thePlayer, level) end return triggerClientEvent(thePlayer, "setWLevel", root, level) else return false end end addEvent("setWantedLevel", true) addEventHandler("setWantedLevel", root, setWantedLevel) function modifyWantedLevel(thePlayer, level) if not thePlayer or not isElement(thePlayer) or getElementType(thePlayer) ~= "player" or not level then return false end if tonumber(level) == 0 then return false end local curWanted = getWantedLevel(thePlayer) or 0 local newWanted = tonumber(curWanted)+tonumber(level) if newWanted > 24 then newWanted = 24 elseif newWanted < 0 then newWanted = 0 end if sendTheEvents(thePlayer, newWanted) then wantedLevel[thePlayer] = newWanted setElementData(thePlayer,"wanted",tostring(newWanted)) setPlayerNametagText(thePlayer,getPlayerName(thePlayer).."["..tostring(newWanted).."]") if newWanted ~= 0 then setWantedTimer(thePlayer,newWanted) end return triggerClientEvent(thePlayer,"setWLevel",root,newWanted) else return false end end addEvent("modifyWantedLevel", true) addEventHandler("modifyWantedLevel",root,modifyWantedLevel) function getWantedLevel(thePlayer) if not thePlayer or not isElement(thePlayer) or getElementType(thePlayer) ~= "player" then return false end if not getElementData(thePlayer,"loggedIn") then return end if wantedLevel and wantedLevel[thePlayer] then return wantedLevel[thePlayer] else return tonumber(getElementData(thePlayer,"wanted")) or 0 end end function setInJail(thePlayer,isinjail) if not isinjail then isinjail = false end local account = getPlayerAccount(thePlayer) if account then setAccountData(account, "jailed", isinjail) injail[thePlayer] = isinjail setElementData(thePlayer,"jailed",isinjail) return true else return false end end function getInJail(thePlayer) if not thePlayer or not isElement(thePlayer) or getElementType(thePlayer) ~= "player" then return false end local account = getPlayerAccount(thePlayer) if not account then return false end return getAccountData(account, "jailed") end function setWantedTimer(player, wlevel) if wantedLevelTimer[player] then killTimer(wantedLevelTimer[player]) end if tonumber(wlevel) > 0 then wantedLevelTimer[player] = setTimer(function(player) local wlevel = getWantedLevel(player) if type(wlevel) ~= "number" then return end local wlevel = tonumber(wlevel)-1 setWantedLevel(player,wlevel) end,300000,1,player) setPlayerNametagText(player,getPlayerName(player).."["..tostring(wlevel).."]") end end function joinedWantedLevel() local account = getPlayerAccount(source) if not account then return end local wlevel = 0 if getAccountData(account, "wanted") then wlevel = getAccountData(account, "wanted") end setWantedLevel(source,wlevel) end addEventHandler("onPlayerLogIn",root,joinedWantedLevel) function quitWantedLevel(player, account) if not account then account = getPlayerAccount(player) end if wantedLevelTimer[player] then killTimer(wantedLevelTimer[player]) end local wlevel = getWantedLevel(player) or 0 if account then setAccountData(account, "wanted", wlevel) end if wantedLevel[player] then wantedLevel[player] = nil end end addEventHandler("onPlayerLogout",root,function(acc) quitWantedLevel(source, acc) end) addEventHandler("onPlayerQuit",root,function() quitWantedLevel(source) end) local mta_killTimer = killTimer function killTimer(timer) for key,value in ipairs(getTimers()) do if (timer == value) then return mta_killTimer(timer) end end return false end function startWantedResource() setTimer(startWantedLevel,500,1) end addEventHandler("onResourceStart",resourceRoot,startWantedResource) function playerSpawn() if getPlayerTeam(source) then if copTeams[getTeamName(getPlayerTeam(source))] and getWantedLevel(source) > 0 then setTimer(function(player) killPed(player) exports.ORCcommands:sendMessage("You can't spawn in a law enforcement team with stars.", 255, 255, 0, player) end, 1000, 1, source) end end end addEventHandler("onPlayerSpawn", root, playerSpawn) function sendTheEvents(player, stars) local e1 = triggerEvent("onPlayerWantedLevelChange", player, stars) local e2 = triggerClientEvent("onClientPlayerWantedLevelChange", player, stars) return e1 and e2 end
  18. jailserver.lua addEvent("onPlayerArrested") addEvent("onPlayerReleased") local jailLocations = {} local arrestedCrims = {} local cell = { ["jail 1"] = {3094.1767578125,-808.15942382813,1.2345782518387,6}, } --local cell = {-577.34661865234,2584.078125,53.515625,6},{1102.9329833984,-2927.1062011719,3.9781250953674,6} local zoneTables = { ["los santos"] = {1543.2390136719,-1676.0291748047,13.556066513062,0}, ["san fierro"] = {-1601.7484130859,722.07757568359,11.283002853394,0}, ["las venturas"] = {2289.6687011719,2423.37890625,10.8203125,0}, ["flint county"] = {-550.44763183594,-1006.8661499023,24.081153869629,0}, ["whetstone"] = {-2163.6845703125,-2387.5734863281,30.625,0}, ["red county"] = {633.32086181641,-571.38275146484,16.3359375,0}, ["tierra robada"] = {-1417.8824462891,2631.4116210938,55.8359375,0}, ["bone county"] = {-206.83717346191,981.92529296875,19.221559524536,0}, ["unknown"] = {-206.83717346191,981.92529296875,19.221559524536,0} } local prisonCells = { {-549.94152832031, 2595.9230957031, 53.515625}, {1102.9329833984, -2927.1062011719, 3.9781250953674} } function arrestCrim(crim,cop,message,message2,spawned) if crim and getPlayerTeam(crim) then if not arrestedCrims[crim] then if not spawned then if getElementData(crim,"jailed") then return end end setElementData(crim, "jailed", true) arrestedCrims[crim] = true local crimWanted = getWantedLevel(crim) local jailTime = crimWanted * 15 if getElementData(crim, "surrender.lesstime") then jailTime = jailTime * 0.50 toggleAllControls(crim, true) setElementData(crim,"surrender.lesstime",false) end if cop then local money = 2000 + (crimWanted * 400) --exports.ORCcommands:giveMoney(cop,money) givePlayerMoney ( cop, money ) end setInsideJail(crim,jailTime,crimWanted,adminjail) setInJail(crim,true) removePedFromVehicle(crim) takeAllWeapons(crim) triggerEvent("onPlayerArrested",root,crim,cop) if message then exports.ORCcommands:sendMessage(message, 255,255,255, false, false, true) end if message2 then exports.ORCcommands:sendMessage(message2,255,255,255,crim) end end end end addEvent("arrestCrim",true) addEventHandler("arrestCrim",root,arrestCrim) function setInsideJail(crim,jailTime,wanted,adminjail) fadeCamera(crim,false) tempweapons = {} w = getWantedLevel(crim) local username = getElementData(crim,"username") triggerClientEvent(crim,"startJailCounter",crim,jailTime) setTimer(warpPlayerToCell, 1000, 1, crim,cell,true,wanted,adminjail) end function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end function warpPlayerToCell(crim,place,tojail,wanted,adminjail) if crim and isElement(crim) then arrestedCrims[crim] = nil local newDim if tojail then -- if he is sent to jail local x,y,z = getElementPosition(crim) local zone = getZoneName(x,y,z,true) local zTable = zoneTables[zone:lower()] jailLocations[crim] = zTable newDim = 0 setElementHealth(crim, 100) -- -- -- -- -- -- -- -- -- -- -- -- -- -- - local randCell = math.random(#prisonCells); local X,Y,Z = prisonCells[randCell][1], prisonCells[randCell][2], prisonCells[randCell][3] setElementPosition(crim, X, Y, Z) toggleControl(crim, "jump", false) else -- released from jail newDim = 0 setElementInterior(crim, 0, place[1], place[2], place[3]) jailLocations[crim] = nil if theBlip and isElement(theBlip) then setElementVisibleTo(theBlip,root,true) end toggleControl(crim, "jump", true) end setElementDimension(crim, newDim) end end function playerGetReleased() -- source is crim if getElementType(source) == "player" then local injail = getInJail(source) if injail == true then toggleControl(crim, "jump", true) local spawn = jailLocations[source] or zoneTables["los santos"] setTimer(warpPlayerToCell,1000,1,source,spawn,false) triggerEvent("onPlayerReleased",getRootElement(),source) triggerClientEvent("onClientPlayerReleased",source) exports.ORCcommands:sendMessage(getPlayerName(source).." has been released from jail.",255,255,255, false, false, true) setWantedLevel(source,0) setElementData(source, "jailed", false) setInJail(source,false) -- -- -- -- -- -- -- -- -- -- -- -- -- setElementPosition(source, jailLocations[source][1], jailLocations[source][2], jailLocations[source][3]) jailLocations[source] = nil end end end addEvent("onPlayerGetReleased", true) addEventHandler("onPlayerGetReleased", root, playerGetReleased) -- JAILBREAKS OMG local vert1 = {-541.90118408203,2608.1440429688,53.515625} local vert2 = {-541.90118408203,2608.1440429688,53.515625} local w = vert2[1] - vert1[1] local h = vert2[2] - vert1[2] local d = vert2[3] - vert1[3] prisonCol = createColCuboid(vert1[1], vert1[2], w, h, d) setElementDimension(prisonCol, 0) setElementInterior(prisonCol, 0) function playerEnterJail(element,dimension) if element and dimension and getElementType(element) == "player" then local team = getPlayerTeam(element) if team and not (copTeams[getTeamName(team)] or getInJail(element)) then -- the player who entered jail area isn't a cop exports.ORCcommands:sendMessage("*JAIL* You are have entered the jail.",255,255,255,element) if (texthasdisplayed == nil) then texthasdisplayed = true exports.RPGpolice:alertPolice("*JAIL* There is a criminal breach in the prison, all units respond!") setTimer(rePrintText, 15000, 1) end modifyWantedLevel(element, 10) elseif copTeams[getTeamName(team)] and getTeamName(team) == "Police" then if isPedInVehicle(element) then blowVehicle(getPedOccupiedVehicle(element)) end if not isPedDead(element) then killPed(element) end exports.ORCcommands:sendMessage("*JAIL* You are not allowed to enter the jail as a cop. Leave its defense to the army.",255,255,255,element) end end end function playerLeaveJail(element,dimension) if element and dimension and getElementType(element) == "player" then if getElementData(element,"jailed") and not isPedDead(element) then modifyWantedLevel(element, 10) jailLocations[element] = nil for k,v in ipairs({"fire","enter_exit","action","crouch","next_weapon","previous_weapon"}) do toggleControl(element,v,true) end triggerEvent("onPlayerReleased",root,element) triggerClientEvent( element, "onClientPlayerReleased", element) setInJail(element,false) setElementData(element, "jailed", false) exports.ORCcommands:sendMessage("You have broken out from prison!",255,255,255, element, false) exports.RPGpolice:alertPolice( getPlayerName(element).." has broken out from prison!" ) toggleControl(element, "jump", true) end end end addEventHandler ( "onPlayerWasted", root, function() if getElementData(source,"jailed") then setElementData(source,"jailed",false) end end ) addEventHandler("onColShapeHit",prisonCol,playerEnterJail) addEventHandler("onColShapeLeave",prisonCol,playerLeaveJail) function rePrintText() texthasdisplayed = nil end function fadePlayerIn(crim) if crim then if isElement(crim) then fadeCamera(crim,true) end end end function resetCrimOnQuit() jailLocations[source] = nil end addEventHandler("onPlayerQuit", root, resetCrimOnQuit) Erorr: RPGPolice/jail_server.lua:35: attempt to perform aritmethic on local "crimwanted" < a nil value> 35: local(jailTime = crimWanted * 15)
  19. orcun99

    Help Me

    thank you so much
  20. orcun99

    Help Me

    ERROR: Ohousing/housing_vehicles_server.lua:157: attempt to compare number with nil 157: if price <= tonumber(getElementData(source, "money")) then
  21. orcun99

    Help Me

    select the tool buttons in repair of pressure to go into the tray needs to be repaired, but nothing happens when pressing the buttons in repair
×
×
  • Create New...