Tekken

Members
  • Content Count

    931
  • Joined

  • Last visited

  • Days Won

    1

Tekken last won the day on May 5

Tekken had the most liked content!

Community Reputation

57 Popular

About Tekken

  • Rank
    Hoodsta
  • Birthday 26/08/1997

Details

  • Gang
    None
  • Location
    Romania
  • Interests
    Lua, PHP, MySQL, JavaScript, HTML, CSS

Recent Profile Visitors

5,909 profile views
  1. In core_client.Lua (survivorSystem_client.Lua) you may find the event onClientPlayerDamage and there you will see what happens when in water as if you add another that may create conflicts within the scripts. Also remplace getPedSkin with getElementModel as getPedSkin it's no longer a supported function.
  2. After some play out with createLight these are the results https://imgur.com/a/bOqpVFb And I am pretty satisfied. Once more thank you IIYAMA
  3. Ok, so you have a suggestion?
  4. Tried it out, it doesn't change anything. That may be exactly what I need. Thank you.
  5. So can someone help me with a shader for a little bit more light for peds as some time they're basically black like shadows, so I will really appreciate if someone can show me how to make a shader as I don't understand how those work at all. Thank you guys.
  6. triggerServerEvent triggerClientEvent or using setElementData getElementData good luck
  7. Well in playSound you just need to put kalkils.mp3 or either add the entire path to the meta file depending on the file location within the resource
  8. What do you mean move the tabel? As far as I can see with your arrows you're just trying to change the positions in the table between the elements 1 and 2 (you may call them subtables as they're in the same table), am I right?
  9. I assume you are using dayz gamemode so you will find an event in the client side that manages the blod loss so all you hace to do is to put this at the very top of the event just after cancelEvent() If getElementModel(source) == 285 then return; end if getElementModel(source) == 285 then return; end
  10. This is not how it should line 8 replace this setElementData(player, "lvl", table[i], (getElementData(player,"lvl", table[i]) or 0) + 1); with this setElementData(player, table[i], (getElementData(player, table[i]) or 0) + 1); As I have showed you in the post before, and as I said if you don't understand you may use the more rudimentary way for the beginning and upgrade it as you learn more, as I have did when I have started learning. Good luck.
  11. Tekken

    more efficient

    The first one, for sure. Also you may see on the wiki page of triggerClientEvent Note: It is marginally more efficient to pass one large event than two smallers ones. Btw triggerClientEvent ("name", elm) you don't need to specify the first root as it's already by default. Hope this helped you.
  12. So in accounts.Lua you should have an event called onPlayerDayZLogin addEventHandler("onPlayerDayZLogin", root, function() local lvl = getElementData(source, "lvl") or 0; if lvl then if lvl > 1 then -- give him something elseif lvl > 2 then -- give him something elseif lvl > 3 then -- give him something elseif lvl > 4 then -- give him something elseif lvl > 5 then -- give him something end end end); And for onPlayerLevelUp addEventHandler("onPlayerLevelUp", root, function(newlvl) if newlvl then if newlvl > 1 then -- give him something elseif newlvl > 2 then -- give him something elseif newlvl > 3 then -- give him something elseif newlvl > 4 then -- give him something elseif newlvl > 5 then -- give him something end end end); This is pretty rudimentary as I highly recommend u using something like this but you may not understand table = {"Milk","GPS","Map","Milk","Milk","Milk","Milk","Milk","Milk","Milk","Milk","Milk","Milk","Milk","Milk"} --15 items for 15 levels (you got it?) addEventHandler("EVENT-NAME-HERE", root, function(lvl) -- You may add the event you want here if not lvl then lvl = getElementData(source, "lvl") or 0; end if lvl >= 1 then for i = 1, lvl do setElementData(source, table[i], getElementData(source, table[i]) + 1); end end end); good luck
  13. That's pretty simple as you may just add a if oldlvl + 1 > 30 then return end within addPlayerXp function. And for rewards using the event onPlayerLevelUp you add statement like if newlvl >= 1 then give him something. And for items at spawn you sould check his lvl on spawn and give the item depending on his level Sorry I'm on the phone so I can't do better
  14. You misspelled the 'kilLDayZPlayer' event as you can see it's kilL and not kill (don't know why) local xpNeed = 100; -- E.g. 100 * lvl = XP you need to rank up! addEvent("onPlayerLevelUp", true); function addPlayerXp(player, xp) local acc = getPlayerAccount(player); local oldexp = getAccountData(acc, "exp") or 0; local oldlvl = getAccountData(acc, "lvl") or 1; local newlevel = oldlvl + 1; local newexp = oldexp + xp; setAccountData(acc, "exp", newexp); setElementData(player, "exp", newexp); if (newexp >= (oldlvl * xpNeed)) then local expleft = newexp - (oldlvl * xpNeed); -- added calculation for the exp that may remains after level up. outputChatBox("[Level-Up] Congratulations! New level "..newlevel.."!", player, 66, 134, 244); setAccountData(acc, "lvl", newlevel); setAccountData(acc, "exp", expleft); setElementData(player, "exp", expleft); setElementData(player, "lvl", newlevel); triggerEvent("onPlayerLevelUp", player, newlevel, oldlvl, oldexp, newexp); end end addEventHandler("onPlayerLogin", root, function() local acc = getPlayerAccount(source); if acc then setElementData(source, "lvl", getAccountData(acc, "lvl") or 0); setElementData(source, "exp", getAccountData(acc, "exp") or 0); end end); addEventHandler("onZombieGetsKilled", root, function(killer) if killer and getElementType(killer) == "player" then addPlayerXp(killer, 50); end end); addEventHandler("kilLDayZPlayer", root, function(killer) if (killer and killer ~= source and getElementType(killer) == "player") then addPlayerXp(killer, 50); end end); You're welcome