Jump to content

Saml1er

Retired Staff
  • Posts

    1,058
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Saml1er

  1. Exactly. Mein bhi yahi soch raha tha.... Iss board ka kya fayda agar sab wahan per chalay jaye...
  2. You can solve this by updating that data server side ( each time you update it client side ) and save it onPlayerQuit or you can use setElementData. It also works onPlayerQuit. addEventHandler("onPlayerQuit",root, function () local data = getElementData (source,str) if not data then return end -- Do your stuff with data variable end) But it's better to save it server side. Believe me it's possible. If you're trying to save join time then do something like this: local t = {} addEventHandler("onPlayerJoin",root,function() t[source] = getTickCount() end ) addEventHandler("onPlayerQuit",root,function() local joinTime = t[source] - getTickCount() -- ms -- now do your stuff end ) Btw can you tell me what are you trying to save?
  3. First try to make something and if you encounter problems then show us your code and we'll help you.
  4. There's a small typo in woovie's code. Change triggerClientEvent(v,"playBeep",sound) to triggerClientEvent(v,"playBeep",v,sound)
  5. Mazay karo tum log. Mere liye bhi chootiya hongi inshallah.
  6. Because this part doesn't explain well. You must also post the part where the script is loading saved object.
  7. Nice. Mene kisi russain forums pe dheka ta liken bar bar link bhool jata tha. Ab yahan se aasani hogi.
  8. Saml1er

    Effects

    You can request it.
  9. Mein bhi apna kal post kerta hoon. ;d
  10. Mr.Shariq is mature enough and active. He's suitable for this job. <- My opinion.
  11. Creating more objects will use more ram.... So it will be better to create those objects client side and set their dimension to player's dimension. _dim = setElementDimension function setElementDimension (elem,d) if elem and d and getElementType (elem ) == 'player' then for _, v in ipairs ( getElementsByType("object") ) do _dim (v,d) end return _dim(elem,d) end end All you need to do is to put this code in your resource where you are changing player dimension. If you are doing this in freeroam resource then you must put this code in freeroam resource. EDIT: This is TiM3's solution.
  12. function customDamage(attacker,attacker,weapon,bodypart,loss) outputDebugString("player got damage") if attacker and getElementType(attacker) == "player" then outputDebugString("player check") if attackerweapon == 38 or attackerweapon == 35 or attackerweapon == 36 then killPed(source,attacker,weapon,bodypart,false) outputDebugString("weapon was 38 or 36 or 35 and player got killed.") end end end addEventHandler("onPlayerDamage",root,customDamage) No errors???? There was a missing end..... Test this code and tell me what does it output.
  13. I once had the same problem (It was the onZombieWasted eveny from zombies resource.) I fixed using this: triggerServerEvent("myEvent", resourceRoot,{ x, y, z, marker} )
  14. No, you have to create it then that dimension.
  15. killPed(source,weapon,attacker,bodypart,false) Btw do you see any outputs in debug?
  16. Saml1er

    Chatbox Smileys

    You will try or you already did?
  17. You can modify the table. You can modify the table and most importantly test it. local exp = { -- level = exp [1] = 200, [2] = 400, [3] = 1200 -- add more if you want }
  18. local exp = { -- level = exp [1] = 4, [2] = 5, [3] = 6 -- add more if you want } local lv = exp[(getElementData(localPlayer, "Level") or 0)+1] local lv =(( getElementData(localPlayer, "XP") or 5)/lv)*100 dxDrawText(lv.."%" (336/1024)*sWidth, (745/768)*sHeight, (289/1024)*sWidth, (250/768)*sHeight, tocolor (255, 255, 255, 255), (0.85/1366)*sWidth,(0.9/768)*sHeight,"bankgothic","left","top",false,false,false,true)
  19. Maybe you screwed up something. Can you post the script?
  20. Abhi pata chala. Us ne apna post edit kiya.
  21. Haan ji. local foo = function () return end setTimer ( foo,1000,1) --same setTimer ( function () return end, 1000,1)
  22. setCameraTarget(player,x,y,z) If you don't like MTA's cross hair then you can make a custom one or if you simply wanna render a cross hair then I think you can read the post below.
×
×
  • Create New...