Jump to content

Tekken

Helpers
  • Posts

    1,423
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Tekken

  1. What is the path of shaders? I want to see something.
  2. Try this: local GUI = { window = {}, button = {}, edit = {} }; local guiv = false; addEventHandler("onClientResourceStart", resourceRoot, function() GUI.window[1] = guiCreateWindow(6, 340, 160, 105, "Автосалон",false) GUI.button[1] = guiCreateButton(6, 40, 160, 100, "Купить",false,GUI.window[1]) GUI.edit[1] = guiCreateEdit(6.45, 60, 160, 100, "10000",false,GUI.window[1]) GUI.button[2] = guiCreateButton(6, 20, 160, 100, "Продать",false,GUI.window[1]) guiSetVisible(GUI.window[1], false) end); addCommandHandler("salon", function() if (guiv == false) then guiSetVisible(GUI.window[1], true); showCursor(true); guiv = true; else guiSetVisible(GUI.window[1], false); showCursor(false); guiv = false; end end);
  3. You will need to have MTA San Andreas 1.3 installed, if you don't want MTA 1.3 then download this one: HERE
  4. This is the actual link: https://www.facebook.com/Core-Game-Syst ... 257160363/
  5. Try this: local screenW, screenH = guiGetScreenSize(); addEventHandler("onClientPlayerStuntFinish", getRootElement(), function(sty, sti, dis) stuntType = sty; stuntTime = sti; distance = dis; addEventHandler("onClientRender", getRootElement(), drawStunt); setTimer( removeEventHandler("onClientRender", getRootElement(), drawStunt) stuntType = nil; stuntTime = nil; distance = nil; end, 1000, 1); end); function drawStunt() dxDrawText("You finished stunt: " .. stuntType ..", Time: " .. tostring( stuntTime ).. ", Distance: " .. tostring( distance ), screenW * 0.2219, screenH * 0.7935, screenW * 0.8839, screenH * 0.8963, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false); end
  6. Tekken

    No editor ?

    Reinstall it. I think you deleted it.
  7. if isElementInWater(zombie) then return false; end
  8. I do have the exact same problem on my forum, but I don't know what can be the problem :\, If you guys resolve it, let me know please, If I don't request much.
  9. The setElementData() and getElementData() are safe enough and the best solution to manage player data and if you are still scared about using them you can always compile the script here or add cache="false" in meta.xml(I recommend) if the file is client-side and the file won't be stored on player PC like this: <script src="client.lua" type="client" cache="false"/> And as i say'd setElementData() and getElementData() are synced and if you change the data on client will also be changed on server and reverse.
  10. Showldn't be like this? local cash = tonumber(getAccountData(acc,"cash") or 0); Just asking. Edit: Just me being stupid
  11. Thanks, don't know why I did that I think cause I was hurrying. And about CREATETABLE was just typed bad I know is CREATE TABLE. Updatem my topic.
  12. Tekken

    GUI DATA Refresh

    Each 5 secounds the timer will change the value with a random number: local label = guiCreateLabel(0.1, 0.1, 0.1, 0.1, "Nu number.", true, nil); setTimer(function() guiSetText(label, tostring(math.random(1, 100))); end, 5000, 0);
  13. So, setElementData is synced between client & server so if you do: setElementData(player, "level", 1) server-side in client will also be 1, and you can't use setElementData to store the data cause when you disconnect all data will be lost. Also the source si the element of a event. Read more about events, The first parameter of a command is a player not source, cause a command need a player wlile source can be a vehicle a ped or anything. About MySQL let say you'r player have: setElementData(element, "level", 1) --Notice I put element not player/source! and you want to store it in MySQL What you going to do is: --[[saving player data.]] "onPlayerQuit" local db = dbConnect(); -- bla, bla...Read more about this function by clicking on it! dbExec(db, "CREATE TABLE IF NOT EXIST players_data(name, level)"); addEventHandler("onPlayerLogin", getRootElement(), function() dbExec(db, "INSERT INTO players_data(name, level) VALUES(?,?)", getAccountName(getPlayerAccount(source)), getElementData(source, "level")); end); --[[Loading data.]] "onPlayerLogin" function exist(acc) if (acc) then local q = dbPoll(dbQuery(db, "SELECT * FROM players_data WHERE name='"..acc.."' LIMIT 1"), 0); if (type(q) == "table") then if (#q > 0) then return q; end return false; end end return nil; end addEventHandler("onPlayerLogin", getRootElement(), function() local acc = getAccountName(getPlayerAccount(source)); local data = exist(acc) if (data and type(data) == "table") then for _,v in ipairs(data) do if (v["name"] == acc) then setElementData(source, "level", tonumber(v["level"])) end end end end); Hope you understand. Edit: #Fixed.
  14. function math.percent(procent, value) if (tonumber(procent) and tonumber(value)) then local p = (procent/100)*value; end return p; end Percent calculation.
  15. quality crappy if because he uses low resolution, but that effects if u make/or add crappy looking resources, too. I am talking about the code(dayz), not his screenshot. I am not that stupid... Quality code doesn't show errors or warnings. That's beasause this gamemode was compiled and who decompiled made his own edits and as you can see didn't do a good job, also the original code made by Marwin is messed up (I know that cause I have it).
  16. The DayZ check every 20 secounds if your skin is normal(normal=75), so you have to edit in survivorSystem.lua/spawn.lua/pickups.lua(If I am not mistaken).
  17. What do you mean? Give more details. Not so hard. Don't have one, but I can make one.
  18. Saving player data isn't so easy cause I need to rewrite some built-in DayZ functions and it will not work with the addons from internet.
×
×
  • Create New...