Jump to content

Dre-+-

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by Dre-+-

  1. RESOURCE UPDATED: -Total remaking of engine -Added exports -Fixed some debug errors For see exports go to: Mta wiki page Ye, i thik its will be looks better, but drawing alot of lines can take alot of perfomance.
  2. You should attach event to some element (for example root or source, like triggerClientEvent(source, "savePlayerEq",root)), and also, how you want trigger event to player who leave from server?
  3. Dre-+-

    New hud

    If you want move this hud to top change: hudtopposition = 1 to hudtopposition = 0 in hud.lua
  4. I dont really understand how, but your code add more 4~6 fps, thanx)
  5. Thanks, mate, now its really looks more better) BTW: Do you have MTA Community profile, for i add you in creators? Yes, like Solid said. But I suffer from the "lonewolf" disease(just like any other scripter) which makes you stop working together with other people before you even started talking to them Also, did your script detect that bones were outside the screen? Always check those nil values. Ok, added in special thanks)
  6. Thanks, mate, now its really looks more better) BTW: Do you have MTA Community profile, for i add you in creators?
  7. Ok, if you have good idea)
  8. Radar is awesome! Really good job) These data are correct, but they are not stable because If a player moves, he spends more oxygen: Moving player lose oxygen for 12 sec, but not moving for ~ 20 sec.
  9. Awesome idea! Good luck with it)
  10. Dre-+-

    New hud

    he didn't make the icons. Yeah, it's modified icons from GTA 4
  11. Good job, it's very useful for RPG servers
  12. Dre-+-

    addStat()

    I hope now work) function addStat(thePlayer, theStat, theValue) local getActualPoints = getElementData(thePlayer, "Points") local getActualCash = getElementData(thePlayer, "Cash") if theStat == "Cash" then setElementData(thePlayer, "Cash", getActualCash + theValue) elseif theStat == "Points" then setElementData(thePlayer, "Points", getActualPoints + theValue) end end function onPlayerWins(player) local players = getPlayerCount() local points = players * 1.3 local pointsstat = "Points" local cash = players * 7 local cashstat = "Cash" addStat(thePlayer, pointsstat, points) addStat(thePlayer, cashstat, cash) end or easier: function addStat(thePlayer, theStat, theValue) setElementData(thePlayer, theStat, getElementData(thePlayer,theStat) + theValue) end function onPlayerWins(player) local players = getPlayerCount() local points = players * 1.3 local pointsstat = "Points" local cash = players * 7 local cashstat = "Cash" addStat(thePlayer, pointsstat, points) addStat(thePlayer, cashstat, cash) end
  13. Use call(getResourceFromName("dxscoreboard"), "addScoreboardColumn", "Columnname") and setElementData(player,"Columnname",value) for example: call(getResourceFromName("dxscoreboard"), "addScoreboardColumn", "Language") setElementData(getPlayerFromName("playername1"),"Language","ENG") setElementData(getPlayerFromName("playername2"),"Language","RUS")
  14. This resource add detective vision in MTA(like Batman Arkham Asilum game) For use this resource just use night vision or infrared goggles. I hope you like it) Screenshots: https://wiki.multitheftauto.com/images/4/46/Dvision.png For see exports go to: Mta wiki page Link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2074 BTW: all suggestions or bugs post in commentaries.
  15. You should rename resource to water_level or water-level (dont use space)
  16. local imgTable = { "img/travelling.png","img/image2.png","img/image3.png","img/image4.png" } g_GUI['travelImage'] = guiCreateStaticImage(screenWidth/2-400, screenHeight/2-300,800, 600, imgTable[math.random(#imgTable)], false, nil)
  17. function damageproof() vehicle = getPedOccupiedVehicle (getLocalPlayer()) setVehicleDamageProof (vehicle, true) end addEventHandler ("onClientPlayerVehicleEnter, getLocalPlayer(), damageproof) BTW: in original script you forgot add string: root = getRootElement()
  18. local pedstp1 = { {79,244, 1229, 16.14}, {78,247, 1227, 16.06}, {21,244, 1233, 16.31} } function Createpeds( ) local pedstp = pedstp1[1] local modelid1 = pedstp[1] local x1 = pedstp[2] local y1 = pedstp[3] local z1 = pedstp[4] createPed ( modelid1, x1, y1, z1 ) outputChatBox("peds create") end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), Createpeds ) I think now it work
  19. Dre-+-

    Maps <_<

    Use stopResource(getResourceFromName("last map")) for fix this
  20. function table.find(tabl,word) if type(tabl) ~= "table" or word == nil then return false else local ret = false for k,v in pairs(tabl) do if v == word then return k end end end end Now you can use: table.find(yourtable,whatfind)
  21. I think it fixed: client local gme = getLocalPlayer() addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function( ) local EXP1 = getElementData(gme,"Experience:") local Level1 = getElementData(gme,"Level:") local exptolevel1 = getElementData(gme,"NextLevel:") outputChatBox ( "Player Resource start "..tostring(EXP1).." "..tostring(Level1).." "..tostring(exptolevel1).." "..tostring(gme)) LevelsLabel = guiCreateLabel(0.8578,0.6104,0.125,0.0244,"Level: "..Level1,true) EXPLabel = guiCreateLabel(0.8578,0.6387,0.125,0.0244,"EXP: "..EXP1.." / "..exptolevel1,true) end ) addEventHandler ( "onClientElementDataChange", gme, function ( dataName, player ) local EXP2 = getElementData(gme,"Experience:") local Level2 = getElementData(gme,"Level:") local exptolevel2 = getElementData(gme,"NextLevel:") guiSetText ( EXPLabel, "EXP: "..EXP2.." / "..exptolevel2) guiSetText ( LevelsLabel, "Level: "..Level2) end )
  22. I think it can help: function armourBlock(pickup,dimension) local thePlayer = source local money = getPlayerMoney(thePlayer) -- get the amount of money from the player who entered the command if (pickup == pick1) then if (money > 500) then -- if money is more than 1000 setElementInterior ( source, 18, 1702.97,-1667.89,20.21 ) -- output this message together with the money else outputChatBox("You need at least $500 to use the door", thePlayer) end else if (pickup == pick2) then if (money > 500) then -- if money is more than 1000 setElementPosition ( source,2189.42,-1705.63,96.37) -- output this message together with the money else outputChatBox("You need at least $500 to use the door", thePlayer) end else if (pickup == pick3) then if (money > 500) then -- if money is more than 1000 setElementPosition ( source,2176.76,-1728.92,96.37) -- output this message together with the money else outputChatBox("You need at least $500 to use the door", thePlayer) end else if (pickup == pick4) then if (money > 500) then -- if money is more than 1000 setElementInterior ( source, 0, 2176.47,-1729.39,96.37 ) -- output this message together with the money else outputChatBox("You need at least $500 to use the door", thePlayer) end end end end end end addEventHandler("onPlayerPickupHit",getRootElement(),armourBlock)
×
×
  • Create New...