Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. You only need to use one command in my code, (better than multiple commands). Better see my code properly. SEE MY CODE PROPERLY! I DIN'T FORGET ANYTHING. Sorry for caps, I'm not in mood as I'm injured.
  2. myoutput = { ['true'] = '#FF0000[NOTE] #FFFFFFVehicle god mode turned on!', ['false'] = '#FF0000[NOTE] #FFFFFFVehicle god mode turned off!' } function mode(player) local veh = getPedOccupiedVehicle( player ) if veh then if isVehicleDamageProof( veh ) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then outputChatBox(myoutput[tostring(not isVehicleDamageProof( veh ))], player, 255, 255, 255, true) setVehicleDamageProof( veh, not isVehicleDamageProof( veh ) ) end end end end addCommandHandler("vehmode", mode)
  3. Lagta hein tu thik kahraha hein!
  4. local messages = {"hey","hello","hi"} setTimer(function() outputChatBox(messages[math.random(1,#messages)]) end, 5000,0)
  5. Anubhav

    Effects

    Always see Useful functions. https://wiki.multitheftauto.com/wiki/AttachEffect
  6. Why you waste your time to create the ''same'' thing as in community? god.. To learn? This looks useless for you, but for him it's a lot of work. Learn by doing is the best way to learn. Keep going Bilal To learn? He asks me for help allday but he shouldn't release these things in starting. He should practice and go ahead and create a better 1.
  7. It was messed. Sorry if you disliked! Regards Anubhav - Main founder
  8. Hello everyone! This is the last and final topic of this gamemode. We're active again and dedicated on this gamemode. I have exams incomming in 29-30 days and some people MAY HAVE EXAMS. We'll try our best to release as soon as possible Credits Anubhav - Idea & Main founder and Developer Bilal - Nothing special but a small contribution for extra things. Dennis - Help in dx login panel. MagicMayhem - Developer Left after stealing the SQL resource. ( had not so much things ), and he didn't work on this at all! Feature list DX Login PANEL - 50% DX Character selecter - 90% Mod manager - 100% Reason: Mods getting corrupted and it causes trouble. NPC - 0% NPC Interface - 0% SQL System - 100% I'll keep this topic updated. Sorry if you think I spammed.
  9. Mujha bhi nahi yaad hein, hating Yahoo. google use kar, bahot acha hein. tere sat bura huwa
  10. https://wiki.multitheftauto.com/wiki/DxDrawGifImage
  11. texts = {} addEvent("myEvent", true) function asdf(text) texts["draw"] = text addEventHandler ( "onClientRender", root, draw ) end addEventHandler("myEvent", root, asdf) function draw () dxDrawText(texts['draw'], .......)
  12. That won't work. 2nd argument is time and should be above 50 ms. dim = 0 setTimer( function () obj = createObject(...) setElementDimension(obj, dim) dim = dim + 1 end, 50, 65535)
  13. local alpha = 255 function bind( t, state ) if getPedWeaponSlot ( t ) == 6 then if ( state == "down" ) then alpha = 0 elseif ( state == "up" ) then alpha = 255 end for _, v in ipairs ( getElementsByType ( "object", root, true ) ) do if isElementAttachedToBone ( v ) then local id = getElementModel ( v ) if ( id == 1853 ) then setElementAlpha ( v, alpha ) end end end end end function bindk() if eventName == "onPlayerJoin" then bindKey(source, "aim_weapon", "both", bind) else for i, v in ipairs(getElementsByType("player")) do bindKey(v, "aim_weapon", "both", bind) end end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), bindk) addEventHandler("onPlayerJoin", root, bindk)
  14. Anubhav

    Birthdays

    Same ^^ God bless u
  15. Just set its dimension different when player enters
  16. function takeMoneyFueling (player,money) takePlayerMoney (player,money) end addEvent ("tkf", true) addEventHandler ("tkf", getRootElement(), takeMoneyFueling) local gas1 = createMarker ( 1007.0478515625, -940.341796875, 41.1759, "cylinder", 3, 255, 255, 0, 150 ) local gas2 = createMarker ( 652.5810546875, -570.3798828125, 15.3359, "cylinder", 3, 255, 255, 0, 150 ) local gas3 = createMarker ( 2120.912109375, 929.107421875, 9.82, "cylinder", 3, 255, 255, 0, 150 ) local gas4 = createMarker ( -1609.2822265625, -2718.388671875, 48.539, "cylinder", 3, 255, 255, 0, 150 ) local gas5 = createMarker ( -1673.3056640625, 404.3037109375, 6.1796, "cylinder", 3, 255, 255, 0, 150 ) --local gas6 = createMarker ( -1329.119140625, 2671.9931640625, 49.06, "cylinder", 3, 255, 255, 0, 150 ) --local gas7 = createMarker ( 1595.681640625, 2197.2509765625, 9.82031, "cylinder", 3, 255, 255, 0, 150 ) local gas8 = createMarker ( -1376.40674, -239.16183, 14.14844, "cylinder", 10, 255, 255, 0, 150 ) local gas9 = createMarker ( 64, 1220, 19, "cylinder", 3, 255, 255, 0, 150 ) local gas10 = createMarker ( 2194, 2480, 11, "cylinder", 3, 255, 255, 0, 150 ) local gas11 = createMarker ( 1479.74475, 1813.42822, 10.81250, "cylinder", 10, 255, 255, 0, 150 ) local gas12 = createMarker ( 1590, 2196, 11, "cylinder", 3, 255, 255, 0, 150 ) local gas13 = createMarker ( 2142, 2740, 11, "cylinder", 3, 255, 255, 0, 150 ) local gas14 = createMarker ( -1329, 2671, 50, "cylinder", 3, 255, 255, 0, 150 ) local gas15 = createMarker ( -1680, 412, 7, "cylinder", 3, 255, 255, 0, 150 ) local gas16 = createMarker ( -2413, 970, 11, "cylinder", 3, 255, 255, 0, 150 ) local gas17 = createMarker ( -2244, -2561, 313, "cylinder", 3, 255, 255, 0, 150 ) local gas18 = createMarker ( 653, -570, 16, "cylinder", 3, 255, 255, 0, 150 ) local gas19 = createMarker ( -94, -1161, 3, "cylinder", 3, 255, 255, 0, 150 ) local gas20 = createMarker ( 1945, -1771, 13, "cylinder", 3, 255, 255, 0, 150 ) local gas21 = createMarker ( 1008, -939, 42, "cylinder", 3, 255, 255, 0, 150 ) local gas22 = createMarker ( -1600, -2706, 49, "cylinder", 3, 255, 255, 0, 150 ) local gas23 = createMarker ( -2023, 157, 28, "cylinder", 3, 255, 255, 0, 150 ) local gas24 = createMarker ( 1378.5, 458.5, 20, "cylinder", 3, 255, 255, 0, 150 ) setElementDimension(gas1, 11000 ) setElementDimension(gas2, 11000 ) setElementDimension(gas3, 11000 ) setElementDimension(gas4, 11000 ) setElementDimension(gas5, 11000 ) setElementDimension(gas6, 11000 ) setElementDimension(gas7, 11000 ) setElementDimension(gas8, 11000 ) setElementDimension(gas9, 11000 ) setElementDimension(gas10, 11000 ) setElementDimension(gas11, 11000 ) setElementDimension(gas12, 11000 ) setElementDimension(gas13, 11000 ) setElementDimension(gas14, 11000 ) setElementDimension(gas15, 11000 ) setElementDimension(gas16, 11000 ) setElementDimension(gas17, 11000 ) setElementDimension(gas18, 11000 ) setElementDimension(gas19, 11000 ) setElementDimension(gas20, 11000 ) setElementDimension(gas21, 11000 ) setElementDimension(gas22, 11000 ) setElementDimension(gas23, 11000 ) setElementDimension(gas24, 11000 ) timer = {} function loadBinds () for key, player in ipairs (getElementsByType("player")) do bindKey(player,"space", "down", gasolina) end end addEventHandler("onResourceStart", resourceRoot, loadBinds) function gasolina (player) if getElementType(player) == "player" then if isElementWithinMarker(player,gas1) or isElementWithinMarker(player,gas2) or isElementWithinMarker(player,gas3) or isElementWithinMarker(player,gas4) or isElementWithinMarker(player,gas5) or isElementWithinMarker(player,gas8) or isElementWithinMarker(player,gas9) or isElementWithinMarker(player,gas10) or isElementWithinMarker(player,gas11) or isElementWithinMarker(player,gas12) or isElementWithinMarker(player,gas13) or isElementWithinMarker(player,gas14) or isElementWithinMarker(player,gas15) or isElementWithinMarker(player,gas16) or isElementWithinMarker(player,gas17) or isElementWithinMarker(player,gas17) or isElementWithinMarker(player,gas18) or isElementWithinMarker(player,gas19) or isElementWithinMarker(player,gas20) or isElementWithinMarker(player,gas21) or isElementWithinMarker(player,gas22) or isElementWithinMarker(player,gas23) or isElementWithinMarker(player,gas24) then triggerClientEvent (player,"gasReload",player) end end end function markerEn (hitElement) if source == gas1 or source == gas2 or source == gas3 or source == gas4 or source == gas5 or source == gas6 or source == gas7 or source == gas8 or source == gas9 or source == gas10 or source == gas11 or source == gas12 or source == gas13 or source == gas14 or source == gas15 or source == gas16 or source == gas17 or source == gas18 or source == gas19 or source == gas20 or source == gas21 or source == gas22 or source == gas22 or source == gas23 or source == gas24 then if getElementType(hitElement) == "player" then outputChatBox ("Welcome to refill your vehicle, type /motor to turn off the engine", hitElement, 0, 255, 0) end end end addEventHandler ("onMarkerHit", getRootElement(), markerEn) function onPlayerLogggin () timer[source] = setTimer (sendMech,2500,0,source) bindKey(source,"space", "down", gasolina) end addEventHandler ("onPlayerLogin", getRootElement(), onPlayerLogggin) function onPlayerQuitt () if isTimer(timer[source]) then killTimer (timer[source]) end end addEventHandler ("onPlayerQuit", getRootElement(), onPlayerQuitt) function detect (player) if isPedInVehicle (player) then if getElementData (getPedOccupiedVehicle(player),"fuel") <= 0 then smtm (""..getPlayerName.." needs a mechanic in "..getZoneName(getElementPosition(player)).."", 255, 255, 0) end end end function isVehicleTankEmpty (vehicle) if vehicle then local fuel = getElementData (vehicle,"fuel") if tonumber(fuel) <= 0 then return true end return false end end function refill () for key, vehicles in ipairs (getElementsByType("vehicle")) do local driver = getVehicleOccupant ( vehicles, 0 ) local fuel = getElementData (vehicles,"fuel") or 0 if tonumber(fuel) > 0 then local driver = getVehicleOccupant ( vehicles, 0 ) if driver then toggleControl ( driver, "accelerate", true ) toggleControl ( driver, "brake_reverse", true ) end end end end setTimer (refill,2000,0) function smtm ( message, color1, color2, color3 ) local mechs = getTeamFromName ("Mechanic") if mechs then local playersCops = getPlayersInTeam ( mechs ) for key, mech in ipairs ( playersCops ) do outputChatBox ( message, mech, color1, color2, color3 ) end end end
×
×
  • Create New...