Jump to content

tatusmen

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by tatusmen

  1. Hi everyone, I have three problems: 1. I have a object's model which have a components. Component's names are the same as vehicle's components. This is: door_if_ok, door_if_dam, bonnet_dummy etc. I want to change rotation or position selected components but I can't. Functions: getVehicleComponents, setVehicleComponentRotation, setVehicleComponentPosition don't work with an object. It must be vehicle. But i don't want use the vehicle. Look at screenshot: and here is error in debugscript: here is lua code: local dff=engineLoadDFF("dummytest1.dff", 3426) engineReplaceModel(dff, 3426) local obj=createObject(3426,-2405.01,-597.54,134.70) addCommandHandler("comp", function() local getComponent = getVehicleComponents(obj) for k in pairs (getComponent) do local rx, ry, rz = getVehicleComponentRotation(obj, k) setVehicleComponentRotation(obj, k, rx+10, ry+10, rz+10) end end ) I exported it also as vehicle but both DFF files behave the same. You can download dummytest1.dff from: https://www.dropbox.com/s/bjg8i8kt05a3p ... 1.dff?dl=0 and help me. 2. Can in replace a IFP file? I know about this function https://wiki.multitheftauto.com/wiki/EngineLoadIFP but it is disabled. Do you know any other way to replace this file? 3. Can i add to server files .dff, .txd and other so that they don't download my users' disc? I want to secure my files but i can't when they download it to their computers... I know that is some way but i don't know what i can do this. The CIT server have this funcion. Please help me! Thanks for help.
  2. Hi everyone. I want to export a one function but it doesn't work. I don't know what I do wrong. This is first resource: RESOURCENAME: animwin • meta.xml: • the function: anim.lua function dxDrawAnimWindow(text,height,width,color,font,anim) local x,y = guiGetScreenSize() btwidth = width btheight = height/20 local now = getTickCount() local elapsedTime = now - start local endTime = start + 1500 local duration = endTime - start local progress = elapsedTime / duration local x1, y1, z1 = interpolateBetween ( 0, 0, 0, width, height, 255, progress, anim) local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btwidth, btheight, btheight/11, progress, anim) posx = (x/2)-(x1/2) posy = (y/2)-(y1/2) dxDrawRectangle ( posx, posy-y2, x2, y2, color ) dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) ) dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,"center","center") end function is working second resource: RESOURCENAME: animwin2 • meta.xml: • file which I can export the function from first resource: client.lua function content() local color = tocolor ( 0, 0, 0, 200 ) exports.animwin:dxDrawAnimWindow(".", 500, 500, color, "default-bold", "OutBounce") --call(getResourceFromName("animwin"), "dxDrawAnimWindow", ".", 500, 500, color, "default-bold", "OutBounce") end function main() start = getTickCount() addEventHandler ( "onClientRender", getRootElement(), content ) end bindKey ( "F2", "down", main ) The debugscript error: Please help me . Sorry for my English.
  3. I corrected your version becouse you make some mistakes but it's work: -- clientside local okno = guiCreateWindow(0.4, 0.3, 0.2, 0.3, "Panel Policji", true) guiWindowSetSizable(okno, false) local wybor = guiCreateComboBox(0.1, 0.2, 0.8, 0.6, "-wybierz-", true, okno) guiSetVisible(okno, false) function wypisywanieGraczy (players) local x, y = guiGetSize(wybor, false) guiSetSize(wybor, x, y+25, false) guiComboBoxClear(wybor) for i,v in ipairs(players) do guiComboBoxAddItem(wybor, v) end end addEvent("wypisywanieGraczy", true) addEventHandler("wypisywanieGraczy", getRootElement(), wypisywanieGraczy) function dowy() if isCursorShowing() then showCursor(false) else showCursor(true) end if (guiGetVisible(okno) == true) then guiSetVisible(okno, false) else guiSetVisible(okno, true) end end addCommandHandler("y", dowy) --serverside: function pobieranieGraczy(plr) local x, y, z = getElementPosition(plr) local strefa = createColCircle(x, y, 50) local gracze = getElementsWithinColShape(strefa, "player") local players = {} for i,v in pairs(gracze) do local nicki = getPlayerName(v) outputChatBox(nicki, plr) table.insert(players, nicki) --triggerClientEvent(plr, "wypisywanieGraczy", plr, tostring(nicki)) end triggerClientEvent(plr, "wypisywanieGraczy", plr, players) destroyElement(strefa) end addCommandHandler("x", pobieranieGraczy) I'm so happy, thank you very much .
  4. Hi all. I have to create a script for police fraction and I don't know why this not working. This show me only one player but not all. I want to create a list of players who are within colShape (next to me). Look at this: -- clientside local okno = guiCreateWindow(0.4, 0.3, 0.2, 0.3, "Panel Policji", true) guiWindowSetSizable(okno, false) local wybor = guiCreateComboBox(0.1, 0.2, 0.8, 0.6, "-wybierz-", true, okno) showCursor(true) function wypisywanieGraczy(message) local x, y = guiGetSize(wybor, false) guiSetSize(wybor, x, y+25, false) guiComboBoxClear(wybor) guiComboBoxAddItem(wybor, message) end addEvent("wypisywanieGraczy", true) addEventHandler("wypisywanieGraczy", getRootElement(), wypisywanieGraczy) --serverside: function pobieranieGraczy(plr) local x, y, z = getElementPosition(plr) local strefa = createColCircle(x, y, 50) local gracze = getElementsWithinColShape(strefa, "player") for i,v in pairs(gracze) do nicki = getPlayerName(v) outputChatBox(nicki, plr) -- example: table is working triggerClientEvent(plr, "wypisywanieGraczy", plr, tostring(nicki)) -- combobox isn't working end destroyElement(strefa) end addCommandHandler("x", pobieranieGraczy) Very sorry for my English...
  5. How I can stop rotation ped? The ped is rotating when I'm twisting the vehicle.
  6. how I can attach the players to the vehicle?
  7. Hi! Do you know how to do that in vehicle increase slots passengers? e.g. to Manana get in 4 players, to taxi get in 5 players. How I can do it? PLEASE HELP! sorry for my English .
×
×
  • Create New...