Jump to content

DNL291

Moderators
  • Posts

    3,875
  • Joined

  • Days Won

    67

Everything posted by DNL291

  1. Subtract a small value of position 'z' of the object (setElementPosition) or create it by subtracting a small value of object height ('z' position). If you are using the attachElements function, do the same thing in the function argument.
  2. DNL291

    Help?

    addEventHandler( "onClientResourceStart", resourceRoot, function() txd = engineLoadTXD("textures/myskin.txd") engineImportTXD(txd, 1) dff = engineLoadDFF("textures/myskin.dff", 1) engineReplaceModel(dff, 1) end )
  3. DNL291

    Help?

    addEventHandler( "onClientResourceStart", resourceRoot, function() txd = engineLoadTXD("txdName.txd") engineImportTXD(txd, skinID) dff = engineLoadDFF("dffName.dff", skinID) engineReplaceModel(dff, skinID) end ) <meta> <script src="script.lua" type="client" /> <file src="txdName.txd" /> <file src="dffName.dff" /> </meta> Replace "txdName.txd" and "dffName.dff" to the name of your TXD skin and DFF skin name, respectively. And the script name in meta.xml.
  4. Já foi explicado. Você está chamando uma função em um argumento que deve ser apenas a o elemento do evento que criou o projetil, ou seja, a source do evento que você quer. Se não entendeu aqui está o código... function NemesisShotRocktLancer(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if (getElementData(source, "nemesis") == true) then local resultado = math.random(1,4) if resultado == 1 then createProjectile(source, 20, hitX, hitY, hitZ) end end end addEventHandler ( "onClientPedWeaponFire", getRootElement(), NemesisShotRocktLancer) Além disso, deixe seu código mais organizado.
  5. Tem algum problema com Laggs? Pensei que isso você por causa do server, mas realmente parece ser com seu computador. Assim como dito por Anderl, eu recomendo que você vá ao forum de ajuda principal para que o Towncivilian possa ajuda-lo.
  6. Next time don't be arrogant with people. Go ahead, create the window in the "onClientRender" event. I'm here to help you, not to discuss.
  7. Create the window and image out of the "onClientRender" event. Yours completely didn't work. I'm not saying that my code works. It was made by you, i just edited.
  8. Create the window and image out of the "onClientRender" event.
  9. marker1 = createMarker ( 215.77626, 1826.16956, 5.41406, "cylinder", 1.2, 0, 0, 255, 255 ) function drawingFunction() GWindow1 = guiCreateWindow(426, 183, 407, 363, "Join the Brotherhood", false) guiWindowSetSizable(GWindow1, false) showCursor (true) guiCreateStaticImage( 475, 240, 300, 140, "actest.png", false ) dxDrawText("Welcome, Click Join if you would like to join the Roman Brotherhood, it is your choice to choose your Brotherhood, to choose the path and follow the creed, This is Assassins Creed on MTA.", 458, 366, 806, 509, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, true, true) end addEventHandler("onClientMarkerHit", marker1, function(hitElement) addEventHandler( "onClientRender", root, drawingFunction ) end )
  10. DNL291

    Help gui

    getPlayerTeam Is client-side and server-side.
  11. DNL291

    Help gui

    addEventHandler("onClientGUIClick", root, function () if (source == takebtn) then if (not getTeamName(getPlayerTeam(localPlayer)) == "Unemployed") then outputChatBox("You must Quit From your Job first",255,0,0) return end local row,col = guiGridListGetSelectedItem(skinsgrid) if (row and col and row ~= -1 and col ~= -1) then local skinName = guiGridListGetItemText(skinsgrid, row, 1) if skinName == "Medic 1 (skin: 274)" then triggerServerEvent("setMedic",localPlayer,274) elseif skinName == "Medic 2 (skin: 275)" then triggerServerEvent("setMedic",localPlayer,275) elseif skinName == "Medic 3 (skin: 276)" then triggerServerEvent("setMedic",localPlayer,276) end guiSetVisible(windowjob, false) showCursor(false) else outputChatBox("Please,select a skin of the list.",255,0,0) end elseif (source == closebtn) then guiSetVisible(windowjob, false) showCursor(false) end end )
  12. Isso deve ser porque o limite de FPS do server está definido para 40.
  13. Vehicle mod: https://community.multitheftauto.com/ind ... ls&id=6676 DONE
  14. Try to contact someone of the mta team. Why you want Turkish language for the MTA Community? This will not make any difference, does not have many things to be translated.
  15. DNL291

    HELP SCRIPT

    I just fixed the script. The timer was already in the code, it was not done by me.
  16. DNL291

    HELP SCRIPT

    function giveHealth(source) accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then for i,player in ipairs(getElementsByType("player")) do setElementHealth(player, 200) end setTimer(outputChatBox,50,1,"#00FFFF[#00FFFFSERVER#00FFFF] #00FFFF"..getPlayerName (source) .. " #00FFFFDeu Vida Para todos os Jogadores",getRootElement(),171,205,239,true) else outputChatBox("#ABCDEF* Você não é um Administrador.",source,171,205,239,true) end end addCommandHandler("darvida",giveHealth) function giveArmor(source) accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then for i,player in ipairs(getElementsByType("player")) do setPedArmor(player, 100) end setTimer(outputChatBox,50,1,"#00FFFF[#00FFFFSERVER#00FFFF] #00FFFF"..getPlayerName (source) .. " #00FFFFDeu Colete Para todos os Jogadores",getRootElement(),171,205,239,true) else outputChatBox("#ABCDEF* Você não é um Administrador.",source,171,205,239,true) end end addCommandHandler("darcolete",giveArmor)
  17. Na linha 5 de seu código você esta chamando uma função no argumento que deve ser elemento que criou o projetil. Use apenas o elemento source do evento que deve ser o que você esta querendo.
  18. A função setPedAnalogControlState requer um argumento que é float ( de 0 a 1. Ex: 0.2, 0.5, 0.8 ), diferente de setPedControlState/setControlState. É chamada quando o botão do jogador especificado foi pressionado ou solto/liberado. Resumindo, serve para definir o controle analógico do jogador/ped, e útil para funções do controle mais avançadas. Isso é tudo o que sei, você pode testá-la para ver na prática.
  19. Você pode criar funções em ambos os lados (client & server) para sincronizar dados, mas quanto ao não uso de trigger server & client, não sei se é possível. Porque você não quer usar essa função? se for por motivos de largura de banda (bandwidth), não existe nenhuma maneira de chamar uma função sem ter uso de largura de banda.
  20. The inherit argument already is set to true if not defined.
  21. Use spawnPlayer instead of setElementPosition.
  22. Tem 2 scripts de chat iniciado ao mesmo tempo, talvez seja no admin panel esse segundo que está dando conflito.
  23. DNL291

    help

    I fixed this and edited my post.
  24. DNL291

    help

    Try this: function crmarker (player, cmd, x1, x2, x3 ) local x, y, z = getElementPosition(player) if x1 and x2 and x3 then px, py, pz = x1, x2, x3 marker1 = createMarker ( x, y, z, "cylinder", 255, 0, 0 ) marker2 = createMarker ( tonumber(px), tonumber(py), tonumber(pz), "cylinder", 255, 0, 0 ) else outputChatBox ("[invalid Syntax]: /crmarker [x1], [x2], [x3] ", player, 255, 0, 0 ) end end addCommandHandler("createmarker", crmarker) addEventHandler("onMarkerHit", root, function(hitPlayer) if isElement(marker1) and (source == marker1) then if (getElementType(hitPlayer) == "player") then local vehicle = getPedOccupiedVehicle(hitPlayer) if vehicle then setElementPosition(vehicle, px, py, pz) else setElementPosition(hitPlayer, px, py, pz) end end end end )
×
×
  • Create New...