Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Kenix

    Need Help

    adds only 1 instead of 2 bindKey ("F5", "down", function() if (guiGetVisible(MainWindowLevel) == false) then guiSetVisible(MainWindowLevel,true) showCursor(true) if (skillsID) then local ids = split(getElementData(getLocalPlayer(),"SkillBought"), string.byte(';')) for lol, id in ipairs(ids) do if (id == tonumber(skillsID)) then outputChatBox("get element data") local textAddSkill = guiGridListSetItemText(MainGrid,tonumber(skillsID),5,"purchased",false,false) local textAddSkill2 = guiGridListSetItemColor (MainGrid,tonumber(skillsID),5,0,255,0) outputChatBox("text add "..tostring(textAddSkill).." , "..tostring(textAddSkill2).." , "..tostring(getElementData(getLocalPlayer(),"SkillBought")).."") end end end elseif (guiGetVisible(MainWindowLevel) == true) then guiSetVisible(MainWindowLevel,false) showCursor(false) end end )
  2. https://wiki.multitheftauto.com/wiki/PlaySound3D
  3. видяо из оригинального встроенного мульта ГТА4 Тем более для ГТА4 уже создается "iv-mp" и его форк - "networked: iv". В iv-mp уже можно играть, скриптинг система там взята как аналог из MTASA, язык другой - основан на LUA, освоить за 1 день можно. это не то от команды мта намного лучше выйдет
  4. он будет делаться после версии мта са 2.0 на сколько я знаю
  5. So this question is solved but I need to make this text is saved but not added at the entrance to gridList. for save function ShopLevelSystemLogin() local account = getPlayerAccount(source) if (account) then local GetDataSkills = getAccountData( account, "SkillBuy1" ) if (GetDataSkills) then setElementData ( source, "SkillBuy", GetDataSkills ) outputDebugString("set shop level : " ..tostring(GetDataSkills)) end end end addEventHandler("onPlayerLogin", getRootElement(), ShopLevelSystemLogin) function ShopLevelSystemQuit() local account = getPlayerAccount(source) if (account) then local SaveShopLevel = getElementData(source,"SkillBuy") setAccountData (account,"SkillBuy1",SaveShopLevel) outputDebugString("save shop level : " ..tostring(SaveShopLevel)) end end addEventHandler("onPlayerQuit", getRootElement(),ShopLevelSystemQuit) client if ( skillsID ) then if getElementData(getLocalPlayer(),"SkillBuy") == tonumber(skillsID) then outputChatBox("get element data") local textAddSkill = guiGridListSetItemText(MainGrid,tonumber(skillsID),5,"purchased",false,false) local textAddSkill2 = guiGridListSetItemColor (MainGrid,tonumber(skillsID),5,0,255,0) outputChatBox("text add "..tostring(textAddSkill).." , "..tostring(textAddSkill2).." , "..tostring(getElementData(getLocalPlayer(),"SkillBuy"))) end end Actually, I need to add text to GridList at login
  6. Kenix

    get()

    You can use the so: Example: local resourceName = getResourceName ( resource ) useGunsInSavePlace = get(resourceName..".UseGunsInSaveZone") meta <setting name="#UseGunsInSaveZone" value="[ false ]" /> and https://wiki.multitheftauto.com/wiki/Get He asks if he could use this function CLIENT SIDE. I have not noticed that he was referring to the client side
  7. Kenix

    get()

    You can use the so: Example: local resourceName = getResourceName ( resource ) useGunsInSavePlace = get(resourceName..".UseGunsInSaveZone") meta <setting name="#UseGunsInSaveZone" value="[ false ]" /> and https://wiki.multitheftauto.com/wiki/Get
  8. Kenix

    NO! Handling

    in my opinion it is already added to the MTA 1.1
  9. objects: txd - bad support -- white textures dff - normal support -- dff with no problems encountered col - collision = bad support -- sometimes passes through the object Crash - often crashes or does not load and I do not know what it is connected Cars: txd - bad support -- white textures dff - bad support -- does not support collision in dff Crash -because of the time crash from the game I hope the MTA team to fix these problems . Please Fix This Problems. 500 post
  10. в том то и дело что в col файле всего 1 модель только 1
  11. Вообщем так практически постоянные креши при загрузке/рестарта объекта. Некоторые объекты вообще не хочет грузить сразу вылет Проблемы с плотностью объекта.(игрок проходит сквозь объект) На машинах :белые текстуры (возможно это связано что TXD не подгружается на машину),не делается плотность на машину(возможно проблема с DFF ). и многое многое другое... Как можно решить эти проблемы? Может быть есть какой-нибудь урок для удачной замены объектов и машин?
  12. Kenix

    Timer Set Data

    it working if remove KillTimer Thx guys
  13. Kenix

    Timer Set Data

    I altered the code now it is fully working. yes it work THX DUDE but WARNING : level/test.lua:13 Bad `element` pointer @ `getElementData`(1) this 13 line local SecondsTime5 = getElementData(thePlayer,"Seconds") full code setTimer . StartSecondsTime = setTimer(function() local SecondsTime5 = getElementData(thePlayer,"Seconds") if (SecondsTime5) then local getSecondsTime5 = getElementData(thePlayer, "Seconds") if getSecondsTime5 then setElementData(thePlayer,"Seconds",tonumber(getSecondsTime5+1)) else outputChatBox("I can't get the Seconds!") end end end,1000,0) how fix it? it is spam in the server window.
  14. Kenix

    Timer Set Data

    do that every second add to ElementData + 1 and when such ElementData == 60 seconds, then zero out seconds and do a minute to. but the script does not work exports.dxscoreboard:addScoreboardColumn ( "Seconds" ) exports.dxscoreboard:addScoreboardColumn ( "Minuts") exports.dxscoreboard:addScoreboardColumn ( "Hours") function JoinStartTime(thePlayer) local TimeSec = setElementData(source,"Seconds",0) local TimeMins = setElementData(source,"Minuts",0) local TimeHour = setElementData ( source, "Hours", 0 ) StartSecondsTime = setTimer(function() local SecondsTime5 = getElementData(thePlayer,"Seconds") if (SecondsTime5) then local getSecondsTime5 = getElementData(thePlayer, "Seconds") if getSecondsTime5 then setElementData(thePlayer,"Seconds",tonumber(getSecondsTime5+1)) else outputChatBox("I can't get the Seconds!") end end end,1000,0) end addEventHandler("onPlayerJoin", getRootElement(),JoinStartTime) function SetNewTimers(CurrentCurrentDataName) -- using dataName does not help and use thePlayer does not help outputChatBox("1") local getSecondsTime2 = getElementData(source,"Seconds") local getMinutsTime3 = getElementData(source,"Minuts") local SecondsTime1 = getElementData(source,"Hours") --[[ if (SecondsTime1) then local getSecondsTime1 = getElementData(source, "Seconds") if getSecondsTime1 then setElementData(source,"Seconds",tonumber(getSecondsTime1+1)) end end ]] if (CurrentDataName == "Seconds") then --[[ local getSecondsTime7 = getElementData(source, "Seconds") if getSecondsTime7 then setElementData(source,"Seconds",tonumber(getSecondsTime7+1)) end]] if tonumber( getSecondsTime2 ) == 60 then local MinutsTime2 = getElementData(source,"Minuts") if (MinutsTime2) then local getMinutsTime2 = getElementData(source, "Minuts") if getMinutsTime2 then setElementData(source,"Minuts",tonumber(getMinutsTime2+1)) setElementData(source,"Seconds",0) end end end if (CurrentDataName == "Minuts") then if tonumber( getMinutsTime3 ) == 60 then local HourTime2 = getElementData(source,"Hours") if (HourTime2) then local getHourTime3 = getElementData(source, "Hours") if getHourTime3 then setElementData(source,"Hours",tonumber(getHourTime2+1)) setElementData(source,"Minuts",0) end end end end end end addEventHandler("onElementDataChange",getRootElement(),SetNewTimers) added check once again writes an error on line 12 Bad Argument@ `getElementData` no errors in create dates outputChatBox("Create data"..tostring(TimeSec).." , "..tostring(TimeMins).." , "..tostring(TimeHour))
  15. Kenix

    question

    ok thx but how to remove text when downloaded? What I need to use?
  16. https://wiki.multitheftauto.com/wiki/SetBlipColor
  17. Я играл сегодня и вчера на тактиксе , мод не плохой но нужно ещё дорабатывать , могу предложить мою помощь если нужно. И ещё есть вопрос по подробнее о тактиксе Кто нибудь объясните кто разрабатывает и вообще вся инфа , я думаю всем будет интересно узнать и почему его никто не собирается кидать на паблик в комьюнити? . Да кстати 2 ссыль не работает.
  18. Kenix

    question

    I want to do that when loading begins show text on the screen very need for stalker gm.
  19. All thanks dude I just do not quite understand =) it works.
  20. And this time keep all codes if you are another problem this code works I wrote to you earlier but I want to do that at the start of the resource does not display but only after bind F2
  21. Try to check your date insert this code after: bizx = data["bizx"] bizy = data["bizy"] bizz = data["bizz"] bizid = data["id"] bizname = data["name"] outputChatBox("Data = "..tostring(bizy).." , "..tostring(bizz).." , "..tostring(bizid).." , "..tostring(bizname))
  22. not open He could not open if guiSetVisible (MainWindowLevel, true) instead of the function() I do not know what to do help local getVS = guiGetVisible(MainWindowLevel) addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() bindKey ( "F2", "down", function( ) if (guiGetVisible(MainWindowLevel) == false) then guiSetVisible(MainWindowLevel,true) showCursor(true) outputChatBox("open "..tostring(getVS)) -- Write open false Wtf elseif (guiGetVisible(MainWindowLevel) == true) then guiSetVisible(MainWindowLevel,false) showCursor(false) outputChatBox("close") end end) end)
  23. function startShowingShopLevelMenu() showCursor(true) MainWindowLevel = guiCreateWindow(0.2234,0.0586,0.5969,0.9102,"New Skills Shop",true) MainButton = guiCreateButton(0.1289,0.9418,0.6974,0.0370,"Buy Skill",true,MainWindowLevel) MainGrid = guiCreateGridList(0.0419,0.0354,0.9058,0.8970,true,MainWindowLevel) guiGridListSetSelectionMode(MainGrid,1) guiGridListAddColumn(MainGrid,"ID",0.2) guiGridListAddColumn(MainGrid,"Name",0.2) guiGridListAddColumn(MainGrid,"$",0.2) guiGridListAddColumn(MainGrid,"Level",0.2) guiGridListAddColumn(MainGrid,"Status",0.2) if ( skillsID ) then if getElementData(getLocalPlayer(),"SkillBuy") == tonumber(skillsID) then outputChatBox("get element data") local textAddSkill = guiGridListSetItemText(MainGrid,tonumber(skillsID),5,"purchased",false,false) local textAddSkill2 = guiGridListSetItemColor (MainGrid,tonumber(skillsID),5,0,255,0) outputChatBox("text add "..tostring(textAddSkill).." , "..tostring(textAddSkill2)) end end guiSetVisible(MainWindowLevel, false ) addEventHandler ("onClientGUIClick", MainButton, onClientPlayerSkillBuy) for i,v in ipairs (skillsLevelsTable) do local row21 = guiGridListAddRow (MainGrid) guiGridListSetItemText (MainGrid, row21, 1, v[1], false, true) guiGridListSetItemText (MainGrid, row21, 2, v[2], false, true) guiGridListSetItemText (MainGrid, row21, 3, v[3], false, true) guiGridListSetItemText (MainGrid, row21, 4, v[4], false, true) guiGridListSetItemText (MainGrid, row21, 5, v[5], false, true) guiGridListSetItemText (MainGrid, row21, 6, v[6], false, true) end end
×
×
  • Create New...