Jump to content

Enargy,

Members
  • Posts

    1,102
  • Joined

Everything posted by Enargy,

  1. and when you say 'attach' you mean that the text on the image is outside of dxDrawImage?
  2. Try this: local screenx, screeny = guiGetScreenSize() resolutionA = 1024 resolutionB = 764 x, y = (screenx/resolutionA ), (screeny/resolutionB )
  3. missionMarker = createMarker ( -1626.1, -373.5, 13.4, "cylinder", 2, 0, 255, 255, 170 ) addEventHandler("onResourceStart", resourceRoot, function ( ) missionBlip = createBlipAttachedTo(missionMarker,53) outputChatBox( "[Plane Mission] Ota ammatti lähtölippu kuvakkelta.", player, 0, 255, 255 ) end ) addEventHandler("onMarkerHit", missionMarker, function ( hitElement ) if (getElementType ( hitElement ) == 'player' ) then plane = createVehicle ( 519, -1654, -162, 14, 0, 0, -45 ) warpPedIntoVehicle ( hitElement, plane ) outputChatBox( "[Plane Mission] Lennä punaiselle lipulle.", hitElement, 0, 255, 255 ) finalMarker = createMarker (338, 2505, 16, "checkpoint", 6, 255, 255, 0, 170 ) finalBlip = createBlipAttachedTo(finalMarker,19) end end ) function Remove(thePlayer) if (getElementType(thePlayer) == "player") then if (finalMarker ~= nil) and (source == finalMarker) then if isElement(finalMarker) then givePlayerMoney ( thePlayer, 10000 ) removeEventHandler("onMarkerHit", finalMarker, Remove) destroyElement(finalMarker) outputChatBox( "[Plane Mission] Kiitos kun veit lentokoneen huoltoon. Saat 10K palkkiota.", hitElement, 0, 255, 255 ) end if isElement(finalBlip) and isElement(plane) then destroyElement(finalBlip) destroyElement(plane) end end end end addEventHandler("onMarkerHit", getRootElement(), Remove)
  4. try this; -- SERVER.LUA local greenzone = createColRectangle ( -1997, 239, 110, 80 ) local greenzonemaparea = createRadarArea (-1997, 239, 110, 80, 0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) triggerClienEvent( thePlayer, "onPlayerGodmodeEnable", thePlayer ) end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) triggerClienEvent( thePlayer, "onPlayerGodmodeDisable", thePlayer ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) -- CLIENT.LUA addEvent("onPlayerGodmodeEnable", true) addEvent("onPlayerGodmodeDisable", true) function setGodmode() cancelEvent() end addEventHandler("onPlayerGodmodeEnable", getLocalPlayer(), function() addEventHandler("onClientPlayerDamage", getLocalPlayer(), setGodmode) end) addEventHandler("onPlayerGodmodeDisable", getLocalPlayer(), function() removeEventHandler("onClientPlayerDamage", getLocalPlayer(), setGodmode) end)
  5. use: createMarker createObject moveObject getPlayerTeam/getTeamName addCommandHandler
  6. what do you mean with this? when a player enters the cylinder the marker is destroyed? anything else. what you do with the table called 'Call' is wrong; table.insert -- this works to insert a value into a table
  7. the question is whether someone is willing to help you if you offer a payment amount for the fact
  8. you must create the marker and then attach the marker to the player; following this code: getElementPosition --get the current position of the player createMarker -- obviously the marker attachElementToElement -- attach the marker to the player
  9. https://community.multitheftauto.com/in ... ls&id=7001
  10. Puedes crearlo tu mismo; checkea aqui para que tengas algunas cosas con que te puedas guiar https://wiki.multitheftauto.com/wiki/Slothman/Zombies
  11. Por ejemplo. ---CLIENTE function clickButton() if ( source == acepto ) then triggerServerEvent("onShowText", localPlayer, "Hola! estoy presionando el click.") end end addEventHandler("onClientGUIClick", root, clickButton) ---SERVER addEvent("onShowText", true) addEventHandler("onShowText", getRootElement(), function(texto) outputChatBox(texto, getRootElement(), 255, 0, 0, true) -- el argumento 'texto' es el mensaje que es recibido del cliente end)
  12. Nadie de aquí te dará un script gratis(a menos que sea de la comunidad). En fin. puedes hacer uno mediante el uso de; setElementData/getElementData setAccountData/getAccountData --- y algo de dxDrawFunction
  13. exactly what that means onPlayerChangeTeam? did you triggered or what?
  14. clientside works perfectly server-side function vehicleFBITruck() if ( getPlayerMoney (source) >= 3000 ) then takePlayerMoney(source, 3000) outputChatBox("You have bought Sd.Kfz.222 vehicle.",source) else outputChatBox('You dont have enough money to buy this Vehicle.', source, 255, 0, 0 ) end end addEvent("onVehicleBought", true) addEventHandler("onVehicleBought", getRootElement(), vehicleFBITruck)
  15. there was a parenthesis more in the serverside script
  16. server.lua function giveMeVehicles(vehicles) if type(vehicles) == 'number' then vehicles = { vehicles } end local px, py, pz, prot local radius = 3 local playerVehicle = getPedOccupiedVehicle(source) if playerVehicle and isElement(playerVehicle) then px, py, pz = getElementPosition(playerVehicle) prot, prot, prot = getVehicleRotation(playerVehicle) else px, py, pz = getElementPosition(source) prot = getPedRotation(source) end local offsetRot = math.rad(prot) local vx = px + radius * math.cos(offsetRot) local vy = py + radius * math.sin(offsetRot) local vz = pz + 2 local vrot = prot local vehicleList = g_PlayerData[source].vehicles local vehicle if ( not vehicles ) then return end for i,vehID in ipairs(vehicles) do if i > getOption('vehicles.maxperplayer') then break end if vehID < 400 or vehID > 611 then errMsg(vehID ..' is not correct!', source) elseif not table.find(getOption('vehicles.disallowed'), vehID) then if #vehicleList >= getOption('vehicles.maxperplayer') then unloadVehicle(vehicleList[1]) end vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) warpPedIntoVehicle(source, vehicle) if (not isElement(vehicle)) then return end setElementInterior(vehicle, getElementInterior(source)) setElementDimension(vehicle, getElementDimension(source)) table.insert(vehicleList, vehicle) g_VehicleData[vehicle] = { creator = source, timers = {} } if vehID == 464 then warpPedIntoVehicle(source, vehicle) elseif not g_Trailers[vehID] then if getOption('vehicles.idleexplode') then g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) end g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) end vx = vx + 4 vz = vz + 4 else errMsg(getVehicleNameFromModel(vehID):gsub('y$', 'ie') .. ' is not allowed.', source) end end end
  17. the correct code would be like this local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "CLAN_NAME")then --- team name --- your code end
  18. you must remove the eventHandler play out in the /debugscript 3. otherwise you can't relate functions gui elements with dxDraws
  19. Sí, usando triggerServerEvent.
  20. what is exactly your problem? because it works with the code you just did
  21. Enargy,

    Ayuda

    https://community.multitheftauto.com/
  22. I mean if they have something different, they are the same or another is more "complete".
×
×
  • Create New...