Search the Community

Showing results for tags 'help'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 609 results

  1. addEvent ( "onaduty", true ) function aduty() if getElementData(getLocalPlayer( ),"aduty") == true then timer = setTimer ( function() setElementData(getLocalPlayer( ),"onaduty",true) local x, y, z = getElementPosition( getLocalPlayer( ) ) local playerName = getPlayerName( getLocalPlayer( ) ) local theText = dxDraw3DText( "Admin On duty [DONT SHOOT]", x, y, z+1,05,"default",255,0,0,200) setTimer ( function() destroyElement(theText) end, 59, 1) end, 60, 0 ) else if isTimer(timer) then killTimer(timer) end setElementData(getLocalPlayer( ),"aduty",true) end end addEventHandler ( "onaduty", getRootElement(), aduty) addCommandHandler("duty",aduty) Text.lua Here is problem. I see the text but another players don't! goduty.lua function aduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." Is Now OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is Now OnDuty!") setElementData( player, "blood", 99999999999999999999999 ) heal = "9999999999999999999999999999" end end addCommandHandler("duty",aduty) function offaduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." Is No Longer OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is No Longer OnDuty!") setElementData( player, "blood", 12000 ) end end addCommandHandler("offaduty",offaduty) function heal_func ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then if heal == "an" then setElementData( player, "food", 250 ) setElementData( player, "thirst", 250 ) end end end setTimer(heal_func, 60000, 0) 3dtext.lua local fonts = { [ "default" ] = true, [ "default-bold" ] = true,[ "clear" ] = true,[ "arial" ] = true,[ "sans" ] = true, [ "pricedown" ] = true, [ "bankgothic" ] = true,[ "diploma" ] = true,[ "beckett" ] = true }; function dxDraw3DText( text, x, y, z, scale, font, r, g, b, maxDistance ) assert( type( text ) == "string", "Bad argument @ dxDraw3DText" ); assert( type( x ) == "number", "Bad argument @ dxDraw3DText" ); assert( type( y ) == "number", "Bad argument @ dxDraw3DText" ); assert( type( z ) == "number", "Bad argument @ dxDraw3DText" ); if not scale or type( scale ) ~= "number" or scale <= 0 then scale = 2 end if not font or type( font ) ~= "string" or not fonts[ font ] then font = "default" end if not r or type( r ) ~= "number" or r < 0 or r > 255 then r = 255 end if not g or type( g ) ~= "number" or g < 0 or g > 255 then g = 255 end if not b or type( b ) ~= "number" or b < 0 or b > 255 then b = 255 end if not maxDistance or type( maxDistance ) ~= "number" or maxDistance <= 1 then maxDistance = 12 end local textElement = createElement( "text" ); if textElement then setElementData( textElement, "text", text ); setElementData( textElement, "x", x ); setElementData( textElement, "y", y ); setElementData( textElement, "z", z ); setElementData( textElement, "scale", scale ); setElementData( textElement, "font", font ); setElementData( textElement, "rgba", { r, g, b, 255 } ); setElementData( textElement, "maxDistance", maxDistance ); return textElement end return false end addEventHandler( "onClientRender", root, function( ) local texts = getElementsByType( "text" ); if #texts > 0 then local pX, pY, pZ = getElementPosition( localPlayer ); for i = 1, #texts do local text = getElementData( texts[i], "text" ); local tX, tY, tZ = getElementData( texts[i], "x" ), getElementData( texts[i], "y" ), getElementData( texts[i], "z" ); local font = getElementData( texts[i], "font" ); local scale = getElementData( texts[i], "scale" ); local color = getElementData( texts[i], "rgba" ); local maxDistance = getElementData( texts[i], "maxDistance" ); if not text or not tX or not tY or not tZ then return end if not font then font = "default" end if not scale then scale = 2 end if not color or type( color ) ~= "table" then color = { 255, 255, 255, 255 }; end if not maxDistance then maxDistance = 12 end local distance = getDistanceBetweenPoints3D( pX, pY, pZ, tX, tY, tZ ); if distance <= maxDistance then local x, y = getScreenFromWorldPosition( tX, tY, tZ ); if x and y then dxDrawText( text, x, y, _, _, tocolor( color[1], color[2], color[3], color[4] ), scale, font, "center", "center" ); end end end end end ); NEED HELP!!
  2. Hello, i have an problem. http://imgur.com/a/yG3ng - that's the problem. Can someone help me in that error? PS. I did MTADiag analyse.
  3. I want to stop the gravity after 5 seconds Gravity changes to 0.0001 but does not return to 0.0008 --client side panel = false function test() dxDrawRectangle(414, 297, 109, 29, tocolor(0, 0, 0, 150), false) dxDrawText("TEST GRAVITY", 414, 297, 523, 326, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end function onClientClick (button,state) if parte1hab and button == "left" and state == "down" then if isCursorOnElement(414, 297, 109, 29) then triggerServerEvent ("Gravity-5s", getLocalPlayer()) end end end addEventHandler("onClientClick",root,onClientClick) function open() if panel == false then addEventHandler ("onClientRender", root, test) panel = true showCursor (true) else removeEventHandler ("onClientRender", root, test) panel = false showCursor (false) end end bindKey("F5", "down", open) --server side function Gravity () setPedGravity(source, 0.0001) setTimer(function() setPedGravity(source, 0.0008) end, 5000, 1) end addEvent("Gravity-5s",true) addEventHandler("Gravity-5s",getRootElement(),Gravity)
  4. Hi someone i know he's having problem with mta he's saying that if he open mta start for a few seconds and after that he's out and back to the desktop any way i have asked him to use mta diag and didn't help so i'm looking for someone give me a solution for that here's his mta diag link : https://pastebin.mtasa.com/751466372 Regards! @ccw @Jusonex @Dutchman101 @Anyone knows a solution for that would be great
  5. Hello any1 knows how to add more guns on server? I have dayz server and i would like to get some help. Just tell me here or contact me if you know how to script.
  6. Por favor pasenme paquete de RP para abrir un servidor de paquetes necesitan sus mods de ayuda lo que me ayuda a abrir un servidor
  7. Guys i scripted a command of disable warp its done but i need a idea how to add kaise kare f1 panel me kisko hata hai kya idea hai kisko ? Ye correct hai nah? function warpStatus(player,cmd) if player then if (getElementData(player,"warp.status") == false) then setElementData(player, "warp.status", true) outputChatBox("You have enabled your warping", player) else setElementData(player, "warp.status", false) outputChatBox("You have disabled warping", player) end end end addCommandHandler("warpstatus", warpStatus) function warpMe(targetPlayer) if (getElementData(targetPlayer,"warp.status") == false) then if isPedDead(source) then spawnMe() end local vehicle = getPedOccupiedVehicle(targetPlayer) if not vehicle then -- target player is not in a vehicle - just warp next to him local x, y, z = getElementPosition(targetPlayer) clientCall(source, 'setPlayerPosition', x + 2, y, z) else -- target player is in a vehicle - warp into it if there's space left if getPedOccupiedVehicle(source) then --removePlayerFromVehicle(source) outputChatBox('Get out of your vehicle first.', source) return end local numseats = getVehicleMaxPassengers(vehicle) for i=0,numseats do if not getVehicleOccupant(vehicle, i) then if isPedDead(source) then local x, y, z = getElementPosition(vehicle) spawnMe(x + 4, y, z + 1) end warpPedIntoVehicle(source, vehicle, i) return end end outputChatBox('No free seats left in ' .. getPlayerName(targetPlayer) .. 's vehicle.', source, 255, 0, 0) end local interior = getElementInterior(targetPlayer) setElementInterior(source, interior) setCameraInterior(source, interior) end
  8. Well title says it all, check this GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(0.04, 0.22, 0.40, 0.71, "My Inventory", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(0.03, 0.07, 0.93, 0.82, true, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Item", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "Amount", 0.5) GUIEditor.button[1] = guiCreateButton(0.03, 0.89, 0.31, 0.08, "Use", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(0.66, 0.89, 0.31, 0.08, "Drop", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") guiSetVisible (GUIEditor.window[1], false) PR = { label = {}, progressbar = {} } PR.progressbar[1] = guiCreateProgressBar(0.18, 0.47, 0.64, 0.06, true) PR.label[1] = guiCreateLabel((516 - 101) / 2, (34 - 16) / 2, 101, 16, "Using Repair Kit...", false, PR.progressbar[1]) guiSetFont(PR.label[1], "default-bold-small") guiLabelSetColor(PR.label[1], 1, 126, 253) guiProgressBarSetProgress(PR.progressbar[1], 0) guiSetVisible (PR.progressbar[1], false) function openGUI (result) if guiGetVisible (GUIEditor.window[1]) == true then guiSetVisible (GUIEditor.window[1], false) showCursor (false) guiGridListClear (GUIEditor.gridlist[1], true) outputChatBox ("Bag closed successfully !", 255,0,0) else guiSetVisible (GUIEditor.window[1], true) showCursor (true) guiGridListClear (GUIEditor.gridlist[1], true) outputChatBox ("Bag opened successfully !", 255,255,0) for k,v in ipairs (result) do local row1 = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row1, 1, v["itemname"] , false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row1, 2, v["amoun"] , false, false) end end end addEvent ("onOpenGUI", true) addEventHandler ("onOpenGUI", root, openGUI) function useObject () local item = guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 1) local amount = guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 2) if (source == GUIEditor.button[1]) then if item == "Medic Kits" then if tonumber(amount) > 0 then local pHp = getElementHealth (localPlayer) if tonumber (pHp) < 100 then guiSetVisible (PR.progressbar[1], true) guiSetText (PR.label[1], "Using Medic Kit...") guiProgressBarSetProgress(PR.progressbar[1], 0) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 20)end,500,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 40)end,1000,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 60)end,1500,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 80)end,2000,1) setTimer (function ()setElementHealth (localPlayer, pHp+30) guiProgressBarSetProgress (PR.progressbar[1],100) guiSetVisible (PR.progressbar[1], false)end,2500,1) triggerServerEvent ("onUse", localPlayer, item) outputChatBox ("You have taken 1 Medic Kit It will take effect in 5 seconds.", 255,255,255) guiSetVisible (GUIEditor.window[1], false) showCursor (false) else outputChatBox ("Your HP is full!", 255,0,0) end end elseif item == "Food" then if tonumber(amount) > 0 then local pHp = getElementHealth (localPlayer) if tonumber (getElementHealth (localPlayer)) < 100 then guiSetVisible (PR.progressbar[1], true) guiSetText (PR.label[1], "Eating some food...") guiProgressBarSetProgress(PR.progressbar[1], 0) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 20)end,500,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 40)end,1000,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 60)end,1500,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 80)end,2000,1) setTimer (function ()setElementHealth (localPlayer, pHp+10) guiProgressBarSetProgress (PR.progressbar[1],100) guiSetVisible (PR.progressbar[1], false)end,2500,1) triggerServerEvent ("onUse", localPlayer, item) outputChatBox ("You have taken some Food It will take effect in 5 seconds.", 255,255,255) guiSetVisible (GUIEditor.window[1], false) showCursor (false) else outputChatBox ("Your HP is full!", 255,0,0) end end elseif item == "Repair Kits" then if tonumber(amount) > 0 then local vehicle = getPedOccupiedVehicle (localPlayer) local vehHP = getElementHealth (vehicle) if (vehicle) then if tonumber (vehHP) < 1000 then guiSetVisible (PR.progressbar[1], true) setElementFrozen (localPlayer, true) guiProgressBarSetProgress(PR.progressbar[1], 0) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 20)end,500,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 40)end,1000,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 60)end,1500,1) setTimer (function () guiProgressBarSetProgress(PR.progressbar[1], 80)end,2000,1) setTimer (function () setElementHealth (vehicle, vehHP+250) guiProgressBarSetProgress (PR.progressbar[1],100) guiSetVisible (PR.progressbar[1], false) setElementFrozen (localPlayer, false)end,2500,1) triggerServerEvent ("onUse", localPlayer, item) outputChatBox ("You have taken 1 Repair Kit It will take effect in 5 seconds.", 255,255,255) guiSetVisible (GUIEditor.window[1], false) showCursor (false) else outputChatBox ("Your Vehicle's HP is full!", 255,0,0) end else outputChatBox ("You're not in a vehicle!",255,0,0) end end else outputChatBox ("You either can't use this item or you have 0 units of this item !" ,255,0,0) end end end addEventHandler ("onClientGUIClick", root, useObject) function dropItem () local item = guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 1) local x,y,z = getElementPosition (localPlayer) if (source == GUIEditor.button[2]) then if (item) then if item == "Medic Kits" then pickUp = createPickup ( x, y, z, 3, 1240 ) outputChatBox ("You have dropped a Medic Kit !",255,255,255) guiSetVisible(GUIEditor.window[1], false) showCursor(false) dropped = "Medic Kits" triggerServerEvent ("onUse", localPlayer, item) elseif item == "Repair Kits" then pickUp = createPickup ( x, y, z, 3, 1277 ) outputChatBox ("You have dropped a Repair Kit !",255,255,255) guiSetVisible(GUIEditor.window[1], false) showCursor(false) dropped = "Repair Kits" triggerServerEvent ("onUse", localPlayer, item) elseif item == "Food" then pickUp = createPickup ( x, y, z, 3, 2212 ) outputChatBox ("You have dropped some food !",255,255,255) guiSetVisible(GUIEditor.window[1], false) showCursor(false) dropped = "Food" triggerServerEvent ("onUse", localPlayer, item) elseif item == "Wood" then pickUp = createPickup ( x, y, z, 3, 1448 ) outputChatBox ("You have dropped wood !",255,255,255) guiSetVisible(GUIEditor.window[1], false) showCursor(false) dropped = "Wood" triggerServerEvent ("onUse", localPlayer, item) elseif item == "Oil" then pickUp = createPickup ( x, y, z, 3, 1217 ) outputChatBox ("You have dropped some Oil !",255,255,255) guiSetVisible(GUIEditor.window[1], false) showCursor(false) dropped = "Oil" triggerServerEvent ("onUse", localPlayer, item) else pickUp = createPickup ( x, y, z, 3, 1279 ) outputChatBox ("You have dropped a ".. item .." !",255,255,255) guiSetVisible(GUIEditor.window[1], false) showCursor(false) dropped = item triggerServerEvent ("onUse", localPlayer, item) end end end end addEventHandler ("onClientGUIClick", root, dropItem) function takeObject () triggerServerEvent ("onTakeObject", localPlayer, dropped) end addEventHandler ("onClientPickupHit", pickUp, takeObject)
  9. function onPlayerMoveItemOutOfInventory () if playerMovedInInventory then startRollMessage2("Inventory", "Abusing exploits will result in a ban!", 255, 22, 0 ) return end -- [ID:0000005 - Several grammar + spelling mistakes and typos] //L local itemName = guiGridListGetItemText ( gridlistItems["inventory"], guiGridListGetSelectedItem ( gridlistItems["inventory"] ), 1 ) if getElementData(getLocalPlayer(),itemName) and getElementData(getLocalPlayer(),itemName) >= 1 then if isPlayerInLoot() then local isVehicle = getElementData(isPlayerInLoot(),"vehicle") local isTent = getElementData(isPlayerInLoot(),"tent") if isVehicle and not isTent then local veh = getElementData(isPlayerInLoot(),"parent") local tires,engine,parts = getVehicleAddonInfos (getElementModel(veh)) if itemName == "Tire" and (getElementData(isPlayerInLoot(),"Tire_inVehicle") or 0) < tires or itemName == "Engine" and (getElementData(isPlayerInLoot(),"Engine_inVehicle") or 0) < engine or itemName == "Tank Parts" and (getElementData(isPlayerInLoot(),"Parts_inVehicle") or 0) < parts then if itemName == "Tank Parts" then itemName = "Parts" end triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName.."_inVehicle",isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) elseif isToolbeltItem(itemName) then triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName,isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) elseif getLootCurrentSlots(getElementData(getLocalPlayer(),"currentCol")) + getItemSlots(itemName) <= getLootMaxAviableSlots(isPlayerInLoot()) then triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName,isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) else startRollMessage2("Inventory", "Inventory is full!", 255, 22, 0 ) return end elseif isToolbeltItem(itemName) then triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName,isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) elseif getLootCurrentSlots(getElementData(getLocalPlayer(),"currentCol")) + getItemSlots(itemName) <= getLootMaxAviableSlots(isPlayerInLoot()) then triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName,isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) else startRollMessage2("Inventory", "Inventory is full!", 255, 22, 0 ) return end else triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName,isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) end end local gearName = guiGetText(headline["loot"]) local col = getElementData(getLocalPlayer(),"currentCol") setTimer(refreshInventory,200,2) if isPlayerInLoot() then setTimer(refreshLoot,200,2,col,gearName) end end addEventHandler ( "onClientGUIClick", buttonItems["inventory"], onPlayerMoveItemOutOfInventory ) How i can chane it to drop all loot? Any scripts? function onPlayerMoveItemInInventory () local itemName = guiGridListGetItemText ( gridlistItems["loot"], guiGridListGetSelectedItem ( gridlistItems["loot"] ), 1 ) if isPlayerInLoot() then if getElementData(isPlayerInLoot(),itemName) and getElementData(isPlayerInLoot(),itemName) >= 1 then if not isToolbeltItem(itemName) then if getPlayerCurrentSlots() + getItemSlots(itemName) <= getPlayerMaxAviableSlots() then if not playerMovedInInventory then triggerEvent("onPlayerMoveItemInInventory",getLocalPlayer(),itemName,isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) else startRollMessage2("Inventory", "Abusing exploits will result in a ban!", 255, 22, 0 ) return end else startRollMessage2("Inventory", "Inventory is full!", 255, 22, 0 ) return end else playerMovedInInventory = true setTimer(function() playerMovedInInventory = false end,700,1) triggerEvent("onPlayerMoveItemInInventory",getLocalPlayer(),itemName,isPlayerInLoot()) end end if isPlayerInLoot() then local gearName = guiGetText(headline["loot"]) local col = getElementData(getLocalPlayer(),"currentCol") setTimer(refreshInventory,200,2) setTimer(refreshLoot,200,2,col,gearName) end end end addEventHandler ( "onClientGUIClick", buttonItems["loot"], onPlayerMoveItemInInventory ) How i can chane it to take all loot? Any scripts?
  10. Hello, I try make a special admin command that sends admin message (/aMSG <message to send>) but I have problems with this. I make it as a part of one .lua script file with rest of chat tags anyway the tags are work fine but when I send the command to the server for example "/aMSG Test" it shows me two WARNING and then one ERROR in console. Console error image This is the script: function onSpecialPlayerChat(amsg, commandName) local aAccount = getAccountName(getPlayerAccount(source)); local aName = getPlayerName(source); local aRoot = getRootElement(); if isObjectInACLGroup("user."..aAccount, aclGetGroup("Console")) then cancelEvent(); outputChatBox("*ADMIN* "..amsg.."/ "..aName.." /", aRoot, 255, 255, 255, true); outputServerLog("CHAT: [ADMIN]"..amsg.."/ "..aName.." /"); else outputChatBox("Nemáš prístup k tomuto príkazu", 255, 0, 0); end end addCommandHandler("aMSG", onSpecialPlayerChat); Thanks for all replies.
  11. local screenW, screenH = guiGetScreenSize() local GUIEditor = { button = {}, window = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(0.35, 0.40, 0.32, 0.12, "Event hírdető panel", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(0.04, 0.68, 0.78, 0.23, "Beírt szöveg kiírása", true, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(0.03, 0.21, 0.93, 0.38, "", true, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(0.84, 0.68, 0.14, 0.23, "Bezár", true, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) guiSetInputMode("no_binds_when_editing") function showGUI() guiSetVisible( GUIEditor.window[1], true ) showCursor( true ) end addEvent( "showguii", true ) addEventHandler( "showguii", localPlayer, showGUI ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) text1 = guiGetText ( GUIEditor.edit[1] ) --text2 = guiGetText ( valasz1 ) --text3 = guiGetText ( valasz2 ) if text1 ~= "" then triggerServerEvent( "server",localPlayer,text1 ) setTimer ( function( ) text1 = nil end,5000, 1 ) end end,false ) addEventHandler ( 'onClientRender',root, function ( ) dxDrawText(text1, (screenW * 0.2924) + 1, (screenH * 0.3778) + 1, (screenW * 0.7014) + 1, (screenH * 0.5400) + 1, tocolor(0, 0, 0, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) dxDrawText(text1, screenW * 0.2924, screenH * 0.3778, screenW * 0.7014, screenH * 0.5400, tocolor(0, 186, 255, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) end ) the dx text why not show on all players screen? o-O
  12. Hello Guys, I just want to write a camera system like in GTA 5. (The Camera is closer to the player, etc) So i can aim with any weapon, but not rotating the ped. Cannot look around, cannot look up, or down when aiming. Any Ideas? local camera = {} local currentCameraView = 1 local cameraView = {} cameraView[1] = 1.2 --SimpleControl cameraView[2] = 6.5 --InVehicle camera.dist = cameraView[currentCameraView] camera.speed = 4 camera.x = math.rad(60) camera.y = math.rad(60) camera.z = math.rad(15) camera.maxZ = math.rad(89) camera.minZ = math.rad(-45) addEventHandler("onClientPreRender", getRootElement(), function() x, y, z = getElementPosition(localPlayer) z = z + 0.2 local camDist = camera.dist local cosZ = math.cos(camera.z) camX = x + math.cos(camera.x)*camDist*cosZ camY = y + math.sin(camera.y)*camDist*cosZ camZ = z + math.sin(camera.z)*camDist setCameraMatrix(camX, camY, camZ + 0.2, x + 0.1, y + 0.1, z + 0.2) end) addEventHandler("onClientCursorMove", getRootElement(), function(curX, curY, absX, absY) local diffX = curX - 0.5 local diffY = curY - 0.5 local camX = camera.x - diffX*camera.speed local camY = camera.y - diffX*camera.speed local camZ = camera.z + (diffY*camera.speed)/math.pi if(camZ > camera.maxZ)then camZ = camera.maxZ end if(camZ < camera.minZ)then camZ = camera.minZ end camera.x = camX camera.y = camY camera.z = camZ end) function isItInVeh() isitin = isPedInVehicle(localPlayer) if isitin == true then currentCameraView = 2 else currentCameraView = 1 end camera.dist = cameraView[currentCameraView] end addEventHandler("onClientPreRender", getRootElement(), isItInVeh) bindKey("mouse_wheel_down", "down", function() cameraView[1] = cameraView[1] + 0.1 if(cameraView[1] >= 2.5)then cameraView[1] = 2.5 end camera.dist = cameraView[currentCameraView] end) bindKey("mouse_wheel_up", "down", function() cameraView[1] = cameraView[1] - 0.1 if(cameraView[1] <= 1.2)then cameraView[1] = 1.2 end camera.dist = cameraView[currentCameraView] end) bindKey("mouse_wheel_down", "down", function() cameraView[2] = cameraView[2] + 0.4 if(cameraView[2] >= 12.5)then cameraView[2] = 12.5 end camera.dist = cameraView[currentCameraView] end) bindKey("mouse_wheel_up", "down", function() cameraView[2] = cameraView[2] - 0.4 if(cameraView[2] <= 6)then cameraView[2] = 6 end camera.dist = cameraView[currentCameraView] end) addEventHandler("onClientRender", getRootElement(), function() if isCursorShowing() then camera.speed = 0 elseif isChatBoxInputActive() then camera.speed = 0 else camera.speed = 4 end end) -----------------------------The Aiming Magic bindKey("aim_weapon", "down", function() outputChatBox("Aiming") end) bindKey("aim_weapon", "up", function() outputChatBox("Not Aiming") end)
  13. Who recommended me a script for Halloween RPG server? Done plz
  14. Hello guys, i recently setuped up my own dayz server, but i need to add like more vehicles i have some vehicles.lua and there are cars adn ther x,y,z i guess its spawn how can i add more? or can some1 just give me some pre-scripted vehicles.lua so i dont have to type it or something? i want more cars on my server basicaly , which players can find and get
  15. Good come to know if there is a script or a function that allows me to give more speed to the cars of a team, any car using the user of that team have for example a 15% extra speed as the damage of weapons .
  16. Hello there. I created a theme some weeks ago, and the problem is that there is a white rectangle at the bottom of the screen. After some searching, I found out that a file called mta_filler was responsible for this. As you expected, I removed the file, but the rectangle was still there. Is there a way to remove this rectangle? Thanks.
  17. So hello. I started up my new server on Dayz i have mod & register/login + admin panel and global chat. But i dont know where to find models for zombies (since i have normal skins from GTA:SA) and how to change them, can you link me and tell me where to replace it? please? :))) + if you can link me even for cars (and i need to spawn somehow cars, like so people can repair it there is no car) and some script for like when i have the name i want before name some title like [VIP]USERNAME + i need some instructions for it. THANKS.
  18. So hello. I started up my new server on Dayz i have mod & register/login + admin panel and global chat. But i dont know where to find models for zombies (since i have normal skins from GTA:SA) and how to change them, can you link me and tell me where to replace it? please? :))) + if you can link me even for cars and some script for like when i have the name i want before name some title like [VIP]USERNAME + i need some instructions for it. THANKS.
  19. Hello, I am scripting a panel that will set people into diffrent dimensions. But i need the code for chaning the Dimension Only, Please Every Answer would be to help. function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1210.48621, 2358.32373, 8.01253 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The Arabian Server") end end addEventHandler("onClientGUIClick", root, teleportPlayer) ------------------------- function teleportPlayer() if(source == GUIEditor.button[2]) then local teleportX, teleportY, teleportZ = 1923.0625, -1760.005859375, 13.546875 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The English Server") end end addEventHandler("onClientGUIClick", root, teleportPlayer)
  20. I've been searching for a MySQL tips and noticed there is no such topics on this forum. So let's fix this little problem. I want to know more about optimising MySQL queries and how to interract with MySQL correctly, I am newbie in that. I learned that putting queries in the loop it's too performance-expensive, wrong, and very big chance it'll freeze your server for uncertain time. So if I want to get information from DB for a many players, better to make it using only 1 query. Example: "SELECT * FROM race_stats WHERE playerID IN(??)" Where "??" = table with logged in players. But, what if I want to update information for a many players at the same time? How such query should look like? For 1 player it looks like this: "UPDATE race_stats SET id1 = id1 + ?, id2 = id2 + ?, id3 = id3 + ?, id4 = id4 + ?, id5 = id5 + ? WHERE playerID = ?" But how to make the same for all players? Put query in the loop will be too performance-expensive I guess and will create laggs. P.S. Maybe for such thing as player stats better to learn MySQL procuderes and create procedure for this, I am newbie, just asking. Don't even know what is procedures exactly, just heard about it.
  21. Hello, I have a small problem with models that are on the ground old one works greate but it was old GTA SA models so I have to chang it to new one becouse of my server all works fine but when I for example drop some item to ground or make fireplace all models are small and I need it like old ones. What is the problem?! Please help me I try everithing and no changes. PS: I'm sorry if there are some mistakes but English is not so good. If you do not understand something just ask I'll try to explain.
  22. Hola soy nuevo en esta comunidad, espero que me puedan ayudar, bueno lo que quiero hacer es un auto respawn de autos que diga en el chat vehiculos restaurados en 10 segundos y todos los vehiculos han sido restaurados algo haci pues. Hi I am new to this community, I hope you can help me, well I want to do is a car auto respawn read in the car chat restored in 10 seconds and all vehicles have been restored as something. primero este script no es mio lo encontre en mta resources y queria modificarlo y eso pero no me funciona local rElement = getRootElement() function respawnVehicles(player, cmd, seconds) if tonumber(seconds) then if not hasObjectPermissionTo(player, "function.banPlayer") then outputChatBox("This command is only executeable for administrators", player, 255, 0, 0, false) return end outputChatBox("** All unoccupied vehicles will be respawned in " .. seconds .. " seconds **", rElement, 220, 220, 0, false) setTimer(function (player) local vehicles = getElementsByType ( "vehicle" ) outputChatBox("** All unoccupied vehicles respawned **", rElement, 220, 220, 0, false) outputDebugString(getPlayerName(player) .. " respawned vehicles.") for k, vehicle in ipairs ( vehicles ) do if isEmpty( vehicle ) then respawnVehicle ( vehicle ) end end end, seconds * 1000, 1, player) else outputChatBox("Syntax: /respawn ", player, 220, 220, 0, false) end end addCommandHandler("respawn",respawnVehicles) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end
  23. Hola chicos, como están.. hoy publico por aquí para saber como solucionar el siguiente error ya que hace muchísimo spam cada vez que se usa el comando http://prntscr.com/cmabmb Espero sus respuestas por favor
  24. i need someone to explain me how does interpolateBetween work and how can it be applied and on what please and thank you. i want to make a script that shows credits like in the movies where credits go from the bottom to the top crossing the screen. like that or can someone tell me if its possible PLEASE AND THANK YOU image
  25. Hola, como están.. publico por aca para saber como arreglar el siguiente problema local tiempo = 3500 if getTickCount() - tiempo > 10000 then tiempo = getTickCount() setTimer(function() return outputChatBox ( "Espera 10 segundos para volver a utilizar esto!", playerSource, 225, 0, 0 ) Eso no deja que hagas spam de un comando, osea no puedes volver a usar el comando por 10 segundos, pero por ejemplo si equis persona pone el comando al mismo tiempo que yo no puede y entonces el tiene que esperar que pasen mis 10 segundos, como hago para que eso sea individual? y que solo el usuario que lo ponga deba esperar 10 segundos? no todos los usuarios , espero sus respuesta gracias //