Jump to content

alexaxel705

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

17 Decent

4 Followers

About alexaxel705

Details

  • Location
    Russian Federation

Recent Profile Visitors

3,194 profile views
  1. https://github.com/alexaxel705/Map
  2. function VehEnt(theVehicle, seat) if(getElementModel(theVehicle) == 411) then addEventHandler("onClientRender", root, Target) end end addEventHandler("onClientPlayerVehicleEnter", localPlayer, VehEnt) function VehExt(theVehicle, seat) if(getElementModel(theVehicle) == 411) then removeEventHandler("onClientRender", root, Target) end end addEventHandler("onClientPlayerVehicleExit", localPlayer, VehExt)
  3. local screenWidth, screenHeight = guiGetScreenSize() local scalex = (screenWidth/1920) local scaley = (screenHeight/1080) local PlayerBones = {1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54} function Target() for _, thePlayer in pairs(getElementsByType("player", root, true)) do local minx, maxx, miny, maxy = screenWidth, 0, screenHeight, 0 for bones in pairs(PlayerBones) do local x,y,z = getPedBonePosition(thePlayer, PlayerBones[bones]) x,y = getScreenFromWorldPosition(x,y,z) if(x and y) then maxx = math.max(x,
  4. alexaxel705

    Weather

    https://community.multitheftauto.com/index.php?p=resources&s=details&id=14553 Этот скрипт устанавливает свойственную регионам погоду. This script has its own regional weather base. local WeatherArr = { ["Los Santos"] = {0,1,2,3,4}, ["San Fierro"] = {5,6,7,8,9}, ["Las Venturas"] = {10,11,12}, ["Red County"] = {13,14,15,16}, ["Whetstone"] = {13,14,15,16}, ["Flint County"] = {13,14,15,16}, ["Bone County"] = {17,18,19}, ["Tierra Robada"] = {17,18,19}, ["UNDERWATER"] = {20}, ["Unknown"] = {21, 22}, }
  5. function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end dxDrawText(RGBToHex(getTeamColor(getTeamFromName("Police"))).."Police", 450,40,64,20,tocolor(255,255,255,255),1.00,"default-bold","center","center", nil, nil, nil, true)
  6. function checkwater() if(isPedDoingTask(localPlayer, "TASK_COMPLEX_IN_WATER")) then setElementHealth(localPlayer, getElementHealth(localPlayer)-0.5) end end addEventHandler("onClientPreRender", root, checkwater) in client
  7. @Erema93 Теоретически, для этого необходимо единовременно загрузить более 211 уникальных моделей в радиусе 300 метров. На практике такое трудно представить, разве что какая нибудь пирамида из авто. Theoretically, for this it is necessary to simultaneously load more than 211 unique models within a radius of 300 meters. In practice, it’s hard to imagine, except perhaps some kind of pyramid from a car.
  8. Вот видео инструкция по запуску скрипта.
  9. alexaxel705

    Unlimit

    it's possible, using the same methods. for script Unlimited Object initial file size ~800 Mb. i'll try experementing with skins and objects in the future.
  10. alexaxel705

    Area name

    setPlayerHudComponentVisible("area_name", false) in client setPlayerHudComponentVisible(thePlayer, "area_name", false) in server
  11. Thomas_Nightfire GetMarrot return Angle in the range from -180 to 180 on which we need to turn wheel. -180 right, +180 left. if active reverse +180 right, -180 left function setPedAnalogControlState takes values from 0.0 to 1.0 therefore, we lower the angle concentration at an acceptable level
  12. Thomas_Nightfire function getPointInFrontOfPoint(x, y, z, rZ, dist) local offsetRot = math.rad(rZ) local vx = x + dist * math.cos(offsetRot) local vy = y + dist * math.sin(offsetRot) return vx, vy, z end function GetMarrot(angle, rz) local marrot = 0 if(angle > rz) then marrot = -(angle-rz) else marrot = rz-angle end if(marrot > 180) then marrot = marrot-360 elseif(marrot < -180) then marrot = marrot+360 end return marrot end function findRotation(x1, y1, x2, y2) local t = -math.deg(math.atan2(x2 - x1, y2 - y1)) return t < 0 and t + 360 or
  13. function scriptCreateTank ( commandName ) local luckyBugger = getLocalPlayer() -- get the local player local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position local theVehicle = createVehicle ( 404, x, y, z + 10 ) -- create the tank 10 units above them setElementData(theVehicle, "model", 737) outputChatBox ( "You got Tank'd!", 255, 0, 0) end --Attach the 'scriptCreateTank' function to the "tank" command addCommandHandler ( "tank", scriptCreateTank ) [M]Province Надо указать новый ID модели setElementData(theVehicle, "model").
  14. Для добавления новой модели, например на ID 737. Надо закинуть файлы txd и dff новой модели в папку models/ Добавить в meta.xml <file src="models/NewModel.dff" type="client" download="false" /> <file src="models/NewModel.txd" type="client" download="false" /> И добавить название модели в client.lua local ModelsName = { ... [736] ... [737] = {"models/NewModel", "Automobile"}, } Перед запуском скрипт надо распаковать. Ну и скачивать его соответственно с https://github.com/alexaxel705/Unlimited-Vehicle Для спауна авто используй функцию CreateVehi
  15. local wind = false function checkTime() local h, _ = getTime() if(h == 6) then if(not isElement(wind)) then wind = createObject(1337,2321.5, -1659.5,13.5) outputChatBox("Object created") end else if(isElement(wind)) then destroyElement(wind) outputChatBox("Object destroyed") end end end addEventHandler("onClientRender", getRootElement(), checkTime)
×
×
  • Create New...