Jump to content

Casti

Members
  • Posts

    15
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

1,172 profile views

Casti's Achievements

Rat

Rat (9/54)

4

Reputation

  1. Hello, I don't know if this topic has been created in this forum before, but I have a few problems, I write my own script and offer it for sale, these scripts of course check a database to see if that server is there and run it, but all functions can be changed from the side file. you know, this causes the product I sell to be shared for free, I thought of many ways, but we have no way because the function is interfered with from the side file, we can avoid this problem if the authorities allow us to create our own _G table, https://luac.multitheftauto.com It would be great if there is an option on the site where we can create the _G (https://www.lua.org/pil/14.html) table ourselves, please respect our efforts. We can see the data sent to many functions such as fetchRemote, dbQuery and we can interfere with them easily, I just showed you how I intervened in a function where we can get the player name, I hope you find a solution to this problem. s.lua - side file _getPlayerName = getPlayerName function getPlayerName(a) iprint(a) return "lalala" end server.luac - main file local name = getPlayerName(player) --Output > "lalala"
  2. This is really great, thank you. We will be happy if you share the link with us again because not everyone can guess that someone shared this link on the last page.
  3. addCommandHandler("create", function(sourcePlayer) if (sourcePlayer) then local x, y, z = getElementPosition ( sourcePlayer ) -- get the player's position local rotZ = getElementRotation ( sourcePlayer ) -- get the player's rotation around the Z axis in degrees Vehicle = createVehicle ( 411, x+2, y, z, 0, 0, rotZ) Object = createObject ( objectid, 0, 0, 0) attachElements (Vehicle, Object, 0, 0, 5 ) end end)
  4. It's very similar to the SAUR RPG server, so I thought you could make your own designs.
  5. If you have the ability to copy them, you should make designs from 0 yourself, then you will be inspired, instead of copying a server, create a server with your own ideas, then you get the attention of the players. -Just my own opinion.
  6. This script is mine and I stopped sharing it, please delete it. https://community.multitheftauto.com/index.php?p=resources&s=details&id=16082 DONE
  7. --Example function followArrestor(player, cop) if (not isElement(player) or not isElement(cop)) then return end if (isPedInVehicle(player) or not isPlayerArrested(player)) then return end local cX, cY = getElementPosition(cop) local pX, pY = getElementPosition(player) local copangle = (360 - math.deg(math.atan2((cX - pX), (cY - pY)))) % 360 setPedRotation(player, copangle) setCameraTarget(player, player) setElementInterior(player, getElementInterior(cop)) setElementDimension(player, getElementDimension(cop)) local dist = getDistanceBetweenPoints2D(cX, cY, pX, pY) if (dist > 16) then -- Warp local x, y, z = getElementPosition(cop) setElementPosition(player, x, y, z) setTimer(followArrestor, 500, 1, player, cop) elseif (dist > 12) then -- Sprint setControlState(player, "sprint", true) setControlState(player, "walk", false) setControlState(player, "forwards", true) setTimer(followArrestor, 500, 1, player, cop) elseif (dist > 6) then -- Jog setControlState(player, "sprint", false) setControlState(player, "walk", false) setControlState(player, "forwards", true) setTimer(followArrestor, 500, 1, player, cop) elseif (dist > 1.5) then -- Walk setControlState(player, "sprint", false) setControlState(player, "walk", true) setControlState(player, "forwards", true) setTimer(followArrestor, 500, 1, player, cop) elseif (dist <= 1.5) then -- Stop setControlState(player, "sprint", false) setControlState(player, "walk", false) setControlState(player, "forwards", false) setTimer(followArrestor, 500, 1, player, cop) end end -- Vehicle Handlers -------------------->> addEventHandler("onVehicleStartEnter", root, function(player, seat) if (#getPlayerArrests(player) == 0) then return end local max_pass = getVehicleMaxPassengers(source) for _,plr in ipairs(getPlayerArrests(player)) do for i=1,max_pass do if (not getVehicleOccupant(source, i)) then warpPedIntoVehicle(plr, source, i) end end end end) addEventHandler("onVehicleExit",root, function(player,seat) if (#getPlayerArrests(player) == 0) then return end for k,v in ipairs(getPlayerArrests(player)) do local max_seats = getVehicleMaxPassengers(source) removePedFromVehicle(v) followArrestor(v,player) end end)
  8. It looks really good, I think that if we use this in more than one script, it will cause FPS to fall.
  9. Zone/City/Builder ABOUT: City is a 100% player built system used in City zones.. Players can buy zones and then build stuff in their zone, like a house or group/team base. City also allows you to interact with some of it's objects, like programmable doors. Zone Command List: /zone - main panel /market - opens the market. /setowner - allows you to transfer the zone to someone else. /zoneolusturx - allows you to create a zone (for authorities) /kaydet - allows you to save all your objects. /hiz <value> - allows you to set the speed of the object. /rot <value> - sets the rotational speed. /obsat - allows you to sell your most recently purchased object. /obkal - allows you to remove the last purchased item. /kopyala - allows you to copy the last purchased item. DOWNLOAD
  10. I'd say you look stylish, I would love to play on such a server, but unfortunately, such quality servers are being shut down.
  11. Was really nice tutorial
×
×
  • Create New...