Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. dxDrawImage dxDrawLine dxDrawText dxDrawRectangle
  2. use /debugscript 3 tell us the error and post the whole code
  3. function buttonPick() if source == Button_VS_sn then if isPedInVehicle(localPlayer) then local v = getPedOccupiedVehicle(localPlayer) local x, y, z = getElementPosition(v) local vehicleZoneName = getZoneName(x, y, z) guiSetText(label_Zone, "", tostring(vehicleZoneName)) end end end addEventHandler("onClientGUIClick", guiRaoot, buttonPick)
  4. function buttonPick(v) if button == "left" and state == "down" then if source == Button_VS_sn then if isElement(v) and getElementType(v) == "vehicle" then local x, y, z = getElementPosition(v) local vehicleZoneName = getZoneName(x, y, z) guiSetText(label_Zone, "", tostring(vehicleZoneName)) end end end end addEventHandler("onClientGUIClick", root, buttonPick)
  5. show all code and put it in tag lua thanks
  6. Dimos7

    Solved

    can you show the client side please
  7. function buttonPickup(theVehicle) if isElement(theVehicle) and getElementType(theVehicle) == "vehicle" then local x, y, z = getElementPosition(theVehicle) local vehicleZoneName = getZoneName(x, y, z) guiSetText(zonexad, "Veh Zone: ", vehicleZoneName) end end
  8. What exacly want the scoreboard to have also here we are help you with the code not make it for you
  9. any error in /debugscript 3?
  10. function replaceModel() txd = engineLoadTXD("feltzer.txd", 415 ) engineImportTXD(txd, 415) dff = engineLoadDFF("feltzer.dff", 415 ) engineReplaceModel(dff, 415) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceModel) addCommandHandler ( "refreshmodels", replaceModel )
  11. no there isn't setElementPosition
  12. addEventHandler("onPlayerLogin", root function() bindKey(source, "mouse2", "down", createAndFire) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do bindKey(v, "mouse2", "down", createAndFire) end end ) local weapon = createWeapon("ak47", 0, 0, 1 ) local weapon2 = createWeapon("ak47", 0, 0, 1 ) setElementAlpha ( weapon, 0) setElementAlpha ( weapon2, 0) local weaponINV = createWeapon("ak47", 0, 0, 1 ) local weapon2INV = createWeapon("ak47", 0, 0, 1 ) function createAndFire(thePlayer) local theVehicle = getPedOccupiedVehicle (thePlayer ) if theVehicle then local x,y,z = getElementPosition ( theVehicle ) local rX,rY,rZ = getElementRotation(theVehicle) attachElements ( weapon, theVehicle, 1, 2, 0, 0, 0, 90 ) attachElements ( weapon2, theVehicle, -1, 2, 0, 0, 0, 90 ) attachElements ( weaponINV, theVehicle, 1, 2, 0, 0, 0, 95 ) attachElements ( weapon2INV, theVehicle, -1, 2, 0, 0, 0, 95 ) fireWeapon(weapon) fireWeapon(weapon2) end end addEventHandler("onResourceStart", resourceRoot, createAndFire)
  13. addEventHandler("onClientGUIClick", GUIEditor.button[1], function() setElementData(localPlayer, "anti.repeater", true) if ( getElementData(localPlayer, "anti.repeater") == true ) then timer[source] = setTimer( function() guiSetProperty( GUIEditor.button[1], "Disabled", "False" ) setElementData(localPlayer, "anti.repeater", false) removeEventHandler("onClientGUIClick", GUIEditor.button[1], cancelShots) end, 10000, 1 ) addEventHandler("onClientGUIClick", GUIEditor.button[1], cancelShots) end end) function cancelShots() if source == GUIEditor.button[1] then guiSetProperty( GUIEditor.button[1], "Disabled", "False" ) else guiSetProperty( GUIEditor.button[1], "Disabled", "True" ) end end
  14. Clinet function location() local x, y, z = getElementPosition(localPlayer) end addEvent("area", true) addEventHandler("area", localPlayer, location) Server function playerArea(thePlayer, x, y, z, _) triggerClientEvent(root, "area", root, x, y, z) outputChatBox("The Player is on"..x.." "..y.." "..z.., thePlayer, 255, 255, 0) end addCommandHandler("loc", playerArea)
  15. Example local ranks = { ["Fireman"] = { {"Level1", 1}, {"Level2", 2}, {"Level3", 3}, {"Level4", 4} } } function rankSet() for _, v in ipairs (ranks) do --code what you want end end
  16. Client case = createObject(3026, 0, 0, 0) --(object attachto, bone, x, y, z, rx, ry, rz) addEvent("backpack", true) addEventHandler("backpack", localPlayer, function() -- Local Player exports.bone_attach:attachElementToBone(case, localPlayer, 5, 0, -0.4, 0.02, 0, 0, 80, 1) --Optimized for backpack exports.global:applyAnimation(localPlayer, "goggles", "goggles_put_on", 1000) --Added animation if player put backpack end ) addEvent("backpackoff", true) addEventHandler("backpackoff", localPlayer, function() exports.bone:detachElementFromBone(case) exports.global:applyAnimation(localPlayer, "goggles", "goggles_put_on", 1000) --Added animation if player put off the backpack moveObject(case, 1, 0, 0, 0) end ) Server addCommandHandler("backpack", function() triggerClientEvent("backpack", root, case) end ) addCommandHandler("backpackoff", function() triggerClientEvent("backpackoff", root, removebriefcase) end )
  17. function getPlayerFromPatrialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function jailTrunk(thePlayer, targetPlayer, _) if targetPlayer then if (getPlayerFromPatrialName(targetPlayer)) then targetPlayer(getPlayerFromPatrialName(targetPlayer)) if targetPlayer ~= thePlayer then if isPedInVehicle(thePlayer) then local theVehicle = getPedOccupiedVehicle(thePlayer) warpPedIntoVehicle(targetPlayer, theVehicle, 4) end end end end end addCommandHandler("tjail", jailTrunk) jailTime = setTimer(jailTrunk, 5000, 1) function unjailedTurnk(thePlayer, targetPlayer) killTimer(jailTime) if getTimerDetails(jailTime) == 0 then if targetPlayer then if (getPlayerFromPatrialName(targetPlayer)) then targetPlayer(getPlayerFromPatrialName(targetPlayer)) removePedFromVehicle(targetPlayer) end end end end
  18. dxDrawText(""..tostring(getElementData(getLocalPlayer(),"pvpmoney")).."", 1150*sW,530*sH,1150*sW,562*sH,tocolor(0,150,150,255), sH*1, "arial", "center", "center", false, false, true,false,false)
  19. Dimos7

    Solved..

    addEventHandler("onVehicleExplode", root, function(theVehicle) if isElementInWater(theVehicle) then setTimer(respawnVehicle, 5000, 1, theVehicle) end setTimer(respawnVehicle, 5000, 1, source) end )
  20. use debugscript 3 and see what error makes also put whole code
  21. function onLogin(thePreviousAccount, theCurrentAccount, autoLogin) if ~= (isGuestAccount(getPlayerAccount(source))) then local playerHealth = getAccountData(theCurrentAccount, "s.health") setElementHealth(source, playerHealth) end end addEventHandler("onPlayerLogin", root, onLogin) function onQuit(quitType, reason, resposibleElement) if ~= (isGuestAccount(getPlayerAccount(source))) then local account = getPlayerAccount(source) if (account) then setAccountData(account, "s.health", tostring(getElementHealth(source))) end end end addEventHandler("onPlayerQuit", root, onQuit)
  22. y is the high so no x maybe change
×
×
  • Create New...