Jump to content

Haze

Members
  • Posts

    83
  • Joined

  • Last visited

Everything posted by Haze

  1. Haze

    GUI An

    no dud i just asked u about SetTimer Function is it A Client or Server dud
  2. Haze

    GUI An

    Hey Solide The im going to Set Timer for Script its Clinet or Server Side
  3. Haze

    GUI An

    Thank everyone and this Forum is Really Good If i have Problem i will always ask for your Help And Ty For LUA i will Use the LUA Tags Next
  4. Haze

    GUI An

    HI ALL I TRY TO MAKE THIS ONE GUI THINK And its not working the An For Hydra in GUI its not working local vehicle1 =createVehicle ( 520, 302.74, 1818.85, 17.64) ArmyVehicles ={[vehicle1]=true} ArmyTeam = { ["Army"]=true } function ArmyenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( ArmyVehicles[source] ) and ( not ArmyTeam[getTeamName ( team )] ) then cancelEvent() guiCreateLabel( 402, 271, 255, 47, "You aren't an Army Member , you mayn't drive this.", false) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle )
  5. Haze

    GUI An

    Yeh instead of outPutChatBox i want it Us GUI Text
  6. Haze

    GUI An

    Hello EveryOne Today i Have this script and i Try to Make The Words on the OutputChatBox Look On Small GUI Announce I use a lot of Commands and Functions but it didnt Work i dont Know why Im going to Post the Code Plz Help me to Make the Words on OutputChatBox Look Us GUI Text And Thank you local vehicle1 =createVehicle ( 520, 302.74, 1818.85, 17.64) ArmyVehicles ={[vehicle1]=true} ArmyTeam = { ["Army"]=true } function ArmyenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( ArmyVehicles[source] ) and ( not ArmyTeam[getTeamName ( team )] ) then cancelEvent() outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle )
  7. Thank you dud you saved the Day
  8. Ok dud No Problem I Wait for the New Code ^^
  9. I DONT SEE THE Hydra at it Place Dud i think its not Created Plz Help duds Plz and thank you
  10. oK DUD i Will Try to Create Army Team To Test But its not Good WAY to Make Script Like that Work I Alerday have Teams .. Thank you any way and i Will Try to do it Know Hope it Work
  11. Sry its Not working im able to Drive the Hydra when im not Army omg
  12. OK DUD Listen The Hydra is Spawnd at his Place it work but when i change my Team to Police or Crimnel i can be Able to Drive the Hydra dud i dont Know why can you Help plz
  13. Thx ALT i know this Name SAES RPG no ??
  14. Hello EveryOne I so a lot of scripts that it make a Hydras For 1 Team Example Army but i didnt Like it when i Create anthor Section is Navy And i dont want the Navy to Go to the Air Force Hydras so i Try this script to make Navy And Air Force have they own Hydra with out sharing the some i tested the script but i didnt Found the Hydra Plz Can Someone Help me And Thank you ArmyVehicles = local vehicle = createVehicle ( 520, 302.74, 1818.85, 17.64) ArmyTeam = { ["Army"]=true } function ArmyenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( ArmyVehicles[getElementModel ( source )] ) and ( not ArmyTeam[getTeamName ( team )] ) and ( seat == 0 ) then removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), copenterVehicle )
  15. https://community.multitheftauto.com/ind ... ils&id=233 Try this Script Frome The Community Next Time Try to Script with your Own No One will Script For you dude ^^
  16. I use this Think to Create Blip on the Map But i want The Blip to be Show Up only On the F11 Map not the Smalle One Down the Screen i want if someone Press F11 he will see the Blip if he is next to it or Far of it And if he look to the smalle screen he will need to be next to the Place to see the Blip Plz Help me And Thank you Very Much
  17. how can i put this script only for admins -- Copyright (c) 2008, Alberto Alonso -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright notice, this -- list of conditions and the following disclaimer in the documentation and/or other -- materials provided with the distribution. -- * Neither the name of the superman script nor the names of its contributors may be used -- to endorse or promote products derived from this software without specific prior -- written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. local Superman = {} -- Static global values local rootElement = getRootElement() local thisResource = getThisResource() -- Resource events addEvent("superman:start", true) addEvent("superman:stop", true) -- -- Start/stop functions -- function Superman.Start() local self = Superman addEventHandler("superman:start", rootElement, self.clientStart) addEventHandler("superman:stop", rootElement, self.clientStop) end addEventHandler("onResourceStart", getResourceRootElement(thisResource), Superman.Start, false) function Superman.clientStart() setElementData(client, "superman:flying", true) end function Superman.clientStop() setElementData(client, "superman:flying", false) end This Server Side -- Copyright (c) 2008, Alberto Alonso -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright notice, this -- list of conditions and the following disclaimer in the documentation and/or other -- materials provided with the distribution. -- * Neither the name of the superman script nor the names of its contributors may be used -- to endorse or promote products derived from this software without specific prior -- written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. local Superman = {} -- Settings local ZERO_TOLERANCE = 0.00001 local MAX_ANGLE_SPEED = 6 -- In degrees per frame local MAX_SPEED = 1.0 local EXTRA_SPEED_FACTOR = 1.85 local LOW_SPEED_FACTOR = 0.40 local ACCELERATION = 0.025 local EXTRA_ACCELERATION_FACTOR = 1.8 local LOW_ACCELERATION_FACTOR = 0.85 local TAKEOFF_VELOCITY = 1.75 local TAKEOFF_FLIGHT_DELAY = 750 local SMOKING_SPEED = 1.25 local GROUND_ZERO_TOLERANCE = 0.18 local LANDING_DISTANCE = 3.2 local FLIGHT_ANIMLIB = "swim" local FLIGHT_ANIMATION = "Swim_Dive_Under" local FLIGHT_ANIM_LOOP = false local IDLE_ANIMLIB = "cop_ambient" local IDLE_ANIMATION = "Coplook_loop" local IDLE_ANIM_LOOP = true local MAX_Y_ROTATION = 55 local ROTATION_Y_SPEED = 3.8 -- Static global variables local thisResource = getThisResource() local rootElement = getRootElement() local localPlayer = getLocalPlayer() local serverGravity = getGravity() -- -- Utility functions -- local function isPlayerFlying(player) local data = getElementData(player, "superman:flying") if not data or data == false then return false else return true end end local function setPlayerFlying(player, state) if state == true then state = true else state = false end setElementData(player, "superman:flying", state) end local function iterateFlyingPlayers() local current = 1 local allPlayers = getElementsByType("player") return function() local player repeat player = allPlayers[current] current = current + 1 until not player or (isPlayerFlying(player) and isElementStreamedIn(player)) return player end end function Superman:restorePlayer(player) setPlayerFlying(player, false) setPedAnimation(player, false) setElementVelocity(player, 0, 0, 0) setElementRotation(player, 0, 0, 0) --setPedRotation(player, getPedRotation(player)) setElementCollisionsEnabled(player, true) self:destroySmokeGenerators(player) self.rotations[player] = nil self.previousVelocity[player] = nil end function Superman:createSmokeGenerator(player) local generator = createObject(2780, getElementPosition(player)) setElementCollisionsEnabled(generator, false) setObjectScale(generator, 0) return generator end function Superman:createSmokeGenerators(player) if not self.smokeGenerators[player] then local smokeGenerators = {} smokeGenerators[1] = self:createSmokeGenerator(player) attachElementToElement(smokeGenerators[1], player, 0.75, -0.2, -0.4, -40, 0, 60) smokeGenerators[2] = self:createSmokeGenerator(player) attachElementToElement(smokeGenerators[2], player, -0.75, -0.2, -0.4, -40, 0, -60) self.smokeGenerators[player] = smokeGenerators end end function Superman:destroySmokeGenerators(player) if self.smokeGenerators[player] then for k, v in ipairs(self.smokeGenerators[player]) do destroyElement(v) end self.smokeGenerators[player] = nil end end function angleDiff(angle1, angle2) angle1, angle2 = angle1 % 360, angle2 % 360 local diff = (angle1 - angle2) % 360 if diff <= 180 then return diff else return -(360 - diff) end end local function isPedInWater(ped) local pedPosition = Vector3D:new(getElementPosition(ped)) if pedPosition.z <= 0 then return true end local waterLevel = getWaterLevel(pedPosition.x, pedPosition.y, pedPosition.z) if not isElementStreamedIn(ped) or not waterLevel or waterLevel < pedPosition.z then return false else return true end end local function isnan(x) math.inf = 1/0 if x == math.inf or x == -math.inf or x ~= x then return true end return false end local function getVector2DAngle(vec) if vec.x == 0 and vec.y == 0 then return 0 end local angle = math.deg(math.atan(vec.x / vec.y)) + 90 if vec.y < 0 then angle = angle + 180 end return angle end -- -- Initialization and shutdown functions -- function Superman.Start() local self = Superman -- Register events addEventHandler("onClientResourceStop", getResourceRootElement(thisResource), Superman.Stop, false) addEventHandler("onPlayerJoin", rootElement, Superman.onJoin) addEventHandler("onPlayerQuit", rootElement, Superman.onQuit) addEventHandler("onClientRender", rootElement, Superman.processControls) addEventHandler("onClientRender", rootElement, Superman.processFlight) addEventHandler("onClientPlayerDamage", localPlayer, Superman.onDamage, false) addEventHandler("onClientElementDataChange", rootElement, Superman.onDataChange) addEventHandler("onClientElementStreamIn", rootElement, Superman.onStreamIn) addEventHandler("onClientElementStreamOut", rootElement, Superman.onStreamOut) -- Bind keys bindKey("jump", "down", Superman.onJump) -- Register commands addCommandHandler("superman", Superman.cmdSuperman) -- Initializate attributes self.smokeGenerators = {} self.rotations = {} self.previousVelocity = {} end addEventHandler("onClientResourceStart", getResourceRootElement(thisResource), Superman.Start, false) function Superman.Stop() local self = Superman setGravity(serverGravity) -- Restore all players animations, collisions, etc for player in iterateFlyingPlayers() do self:restorePlayer(player) end end -- -- Join/Quit -- function Superman.onJoin(player) local self = Superman local player = player or source setPlayerFlying(player, false) end function Superman.onQuit(reason, player) local self = Superman local player = player or source if isPlayerFlying(player) then self:restorePlayer(player) end end -- -- onDamage: superman is invulnerable -- function Superman.onDamage() local self = Superman if isPlayerFlying(localPlayer) then cancelEvent() end end -- -- onStreamIn: Reset rotation attribute for player -- function Superman.onStreamIn() local self = Superman end
  18. Haze

    Help me Blip

    Sry but its not Woring
  19. Haze

    Help me Blip

    i know i will Modife it The Icon Id and the Size i know but i only want to know that i should add it to this Code that i post it ??? I know about the Other Thinks the Icon of Blip size and and ext
  20. Haze

    Help me Blip

    Should i Add this to this Cods or i should make anthor File With the Code that you give to me Thx
  21. Haze

    Help me Blip

    Hi all in this Topic i want your Help to Know How i can add blip for a Carrier a Blip that it show the Location of The Ship in Radar and in F11 that mean Blip For This Carrier local hullx = -1357.7117919922 local hully = 532.47308349609 local hullz = 5.5571422576904 local cH = createObject(10771, -1357.7117919922, 532.47308349609, 5.5571422576904) -- carrier hull local cL = createObject(11145, -1420.6689453125, 532.482421875, 4.378999710083) -- carrier lowdeck local cHa = createObject(11146, -1366.7033691406, 533.04119873047, 12.420551300049) -- carrier hangar local cB = createObject(10770, -1354.3937988281, 524.93719482422, 38.597640991211) -- carrier bridge local cBi = createObject(11237, -1354.4262695313, 524.74877929688, 38.529960632324) -- carrier bits local cLi = createObject(3115, -1456.7243652344, 532.509765625, 10.010332107544) -- carrier lift local cLi2 = createObject(3114, -1414.4064941406, 547.54791259766, 9.7388973236084) -- carrier lift 2 local cIn = createObject(10772, -1356.3599853516, 532.47290039063, 17.386043548584) -- carrier lines local cIn2 = createObject(10772, -1356.3599853516, 532.47290039063, 10.330332107544) -- carrier lines 2 (invisible in hangar) local cD = createObject(3113, -1465.7409667969, 532.85229492188, 1.2527737617493) -- carrier door local cC = createObject(11149, -1363.7884521484, 527.28692626953, 12.11157989502) -- carrier corridiors local cSB1 = createObject(3885, -1394.6096191406, 525.0712890625, 18.118799209595) -- carrier sam base 1 local cSB2 = createObject(3885, -1324.1744384766, 524.89855957031, 20.940547943115) -- carrier sam base 2 local cSS1 = createObject(3884, -1324.0531005859, 525.56842041016, 21.032855606079) -- carrier sam site 1 local cSS2 = createObject(3884, -1394.2770996094, 525.51947021484, 18.218799209595) -- carrier sam site 2 attachElements(cL, cH, -1420.6689453125 - hullx, 532.482421875 - hully, 4.378999710083 - hullz) attachElements(cHa, cH, -1366.7033691406 - hullx, 533.04119873047 - hully, 12.420551300049 - hullz) attachElements(cB, cH, -1354.3937988281 - hullx, 524.93719482422 - hully, 38.597640991211 - hullz) attachElements(cBi, cH, -1354.4262695313 - hullx, 524.74877929688 - hully, 38.529960632324 - hullz) attachElements(cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) attachElements(cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) attachElements(cIn, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 17.386043548584 - hullz) attachElements(cIn2, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 10.330332107544 - hullz) attachElements(cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) attachElements(cC, cH, -1363.7884521484 - hullx, 527.28692626953 - hully, 12.11157989502 - hullz) attachElements(cSB1, cH, -1394.6096191406 - hullx, 525.0712890625 - hully, 18.118799209595 - hullz) attachElements(cSB2, cH, -1324.1744384766 - hullx, 524.89855957031 - hully, 20.940547943115 - hullz) attachElements(cSS1, cH, -1324.0531005859 - hullx, 525.56842041016 - hully, 21.032855606079 - hullz) attachElements(cSS2, cH, -1394.2770996094 - hullx, 525.51947021484 - hully, 18.218799209595 - hullz) function GUIness(source) --here you can add an if check, if you want to restrict it to admins. triggerClientEvent(source, "makeGUI", root) --end end addCommandHandler("accp", GUIness) function goToCarrier(source) --here you can add an if check, if you want to restrict it to admins. local x,y,z = getElementPosition(cH) setElementPosition(source, x, y, z + 15) --end end addCommandHandler("gotocarrier", goToCarrier) function setCarrierHeightFunc(playerSource, commandName, height) if (height) then --here you can add an if check, if you want to restrict it to admins. local x,y,z = getElementPosition(cH) setElementPosition(cH, x, y, tonumber(height)) --end end end addCommandHandler("carrierheight", setCarrierHeightFunc) function stopCaFunc() stopObject(cH) end addEvent("stopCarrier", true) addEventHandler("stopCarrier", root, stopCaFunc) function fixDetach(obj) local x, y, z = getElementPosition(obj) local rx, ry, rz = getElementRotation(obj) detachElements(obj) setElementPosition(obj, x, y, z) setElementRotation(obj, rx, ry, rz) return x, y, z end -- Carrier back door function cDoorOpen() local x, y, z = fixDetach(cD) moveObject(cD, 3000, x - 3, y, z + 10) setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx - 3, 532.85229492188 - hully, 1.2527737617493 - hullz + 10) end addEvent("rearDoorBut", true) addEventHandler("rearDoorBut", root, cDoorOpen) function cDoorClose() local x, y, z = fixDetach(cD) moveObject(cD, 3000, x + 3, y, z - 10) setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) end addEvent("rearDoorButD", true) addEventHandler("rearDoorButD", root, cDoorClose) -- Carrier main lift function cMainLiftUp() local x, y, z = fixDetach(cLi) moveObject(cLi, 3000, x, y, z + 7) setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz + 7) end addEvent("mainLiftBut", true) addEventHandler("mainLiftBut", root, cMainLiftUp) function cMainLiftDown() local x, y, z = fixDetach(cLi) moveObject(cLi, 3000, x, y, z - 7) setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) end addEvent("mainLiftButD", true) addEventHandler("mainLiftButD", root, cMainLiftDown) -- Carrier side lift down function cSideLiftUp() local x, y, z = fixDetach(cLi2) moveObject(cLi2, 3000, x, y, z + 7) setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz + 7) end addEvent("sideLiftBut", true) addEventHandler("sideLiftBut", root, cSideLiftUp) function cSideLiftDown() local x, y, z = fixDetach(cLi2) moveObject(cLi2, 3000, x, y, z - 7) setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) end addEvent("sideLiftButD", true) addEventHandler("sideLiftButD", root, cSideLiftDown) -- Carrier raise/lower/reset function carrierHeightFunc(theValue) local x, y, z = getElementPosition(cH) if (theValue == 5.5) then moveObject(cH, 0, x, y, 5.5) else moveObject(cH, 5000, x, y, z + theValue) end end addEvent("carrierHeight", true) addEventHandler("carrierHeight", root, carrierHeightFunc) -- Carrier warper function carrierWarper(x, y, z) moveObject(cH, 0, x, y, z) end addEvent("moveToBut", true) addEventHandler("moveToBut", root, carrierWarper) -- Directional movement controls function carrierMove(, yD, zD) local x,y,z = getElementPosition(cH) moveObject(cH, 20000, x + , y + yD, z + zD) end addEvent("carrierMoveEvent", true) addEventHandler("carrierMoveEvent", root, carrierMove) -- Rotational movement controls function carrierRotateFunc(rX, rY, rZ) local x,y,z = getElementPosition(cH) moveObject(cH, 5000, x, y, z, rX, rY, rZ) end addEvent("carrierRotate", true) addEventHandler("carrierRotate", root, carrierRotateFunc)
  22. Haze

    Can you Help Us

    Thank you so Much so You Think I should Use this Function for the Othr scripts ??? by the way This one work Thank you so much you are the Best
×
×
  • Create New...