Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. What's the resource's name?
  2. addCommandHandler('kill', function(kill) if not isTimer(killingTimer) then killingTimer = setTimer(killPed, 10000, 1, kill) end end)
  3. Yeah, I'm sure, I have to take a look at it, after thousand of hours working with it. HF buddy.
  4. Can you tell me then, why no one uses your method, and everyone uses setElementData instead of it? Because much easier to use, and it's not an issue in "security" at all, as you tried to mention. That link is about not trusting any data coming from a client (ex. a trigger from a client, because it can be RIGGED), and not even close to server sided setElementDatas.
  5. Buddy, can you tell me how do you want to transfer your table from that script to an another without exporting a function (makes more junk), or calling an event? NO WAY. So if you need ANYTHING from that table, you'll have to call an exported function (which has to be on the same side), or call an event, which then recalls an another even with that table inside. And btw, you need to secure only the client sided setElementData, you can't call that function, if it's only written in a server-sided script.
  6. Much easier to use element data instead of tables, because of easier access to those datas.
  7. I edited the post above, refresh it. Just linked an another forum post.
  8. You'll have to get a screenshot of the GTASA map and calculate the world position refered to the clicked position. Just to give you an idea.
  9. Can you use the code (<>) tags please? addEvent("addVIP",true) addEventHandler("addVIP",getRootElement(),function(source) local account = getPlayerAccount(source) local accName = getAccountName(account) aclGroupAddObject(aclGetGroup("VIP"), "user."..accName) setAccountData(account, "vipBought", getRealTime().timestamp) end) addEventHandler("onPlayerLogin", getRootElement(), function(_, theAccount) if getAccountData(theAccount, "vipBought") then if getRealTime().timestamp > getAccountData(theAccount, "vipBought") + 86400 then outputChatBox("Your VIP has expired.", source, 0, 0, 0, true) aclGroupRemoveObject(aclGetGroup("VIP"), "user." .. getAccountName(theAccount)) end end end)
  10. It's useful to sync data with the server by setElementData for easier and faster access while the player is online. To actually answer your question perfectly, you'll have to give us more information about the environment in which your are trying to use setElementData/dbQuery.
  11. NeXuS™

    help

    Can you give us more description? I can't understand what you are trying to say at all.
  12. I think your native language is not english, so it's kinda hard to understand what you are trying to say. local posY = 0 addEventHandler("onClientPlayerDamage", localPlayer, function(attackerP, dmgType) local _, _, posN = getElementPosition(localPlayer) if (posN + 10 < posY) and dmgType == 54 and attackerP == localPlayer then cancelEvent() end end) setTimer(function() if isPedOnGround(localPlayer) then _, _, posY = getElementPosition(localPlayer) end end, 100, 0) This one should work I think, but not sure. It meant to block all damage from falling, if he jumped from a height from the ground of 10.
  13. NeXuS™

    Fps drops !

    You could just do local node = xmlLoadFile("Lang/english.xml") local optionsNode = xmlFindChild ( node, "category", Count ) local instructionsNode = xmlFindChild ( optionsNode, "subcategory", tableSetText ) local instructionsNodes = xmlFindChild ( instructionsNode, "content", 0 ) local instructions = xmlNodeGetValue ( instructionsNodes ) xmlUnloadFile(node) function dxDrawTest () dxDrawText(instructions, 0,5, 375, 518, tocolor(255, 255, 255, 255)) end addEventHandler("onClientRender",root,dxDrawTest)
  14. NeXuS™

    help

    If you want a simple a command just use addCommandHandler setElementHealth setPedArmor and then maybe use an outputChatBox to output to the player that his health/armor has been updated.
  15. NeXuS™

    Bot Mute

    If you have runcode installed on your server, start it. And then do crun setDevelopmentMode(true). If you don't have, you'll have to do a script for it. local devState = false addCommandHandler("devmode", function() devState = not devState setDevelopmentMode(devState) end)
  16. NeXuS™

    Dx Scroll

    function dxDraws() dxSetRenderTarget(renderTarget, true) dxSetRenderTarget() dxDrawImage(375, 198, 835, 518, renderTarget, 0 ,0 ,0,tocolor(0, 5, 7, 168)) local Percentage = (-moveY)/Size dxDrawRectangle(1210-scrollerW, 198+Percentage*15, scrollerW, scrollerH, tocolor(30, 194, 161, 239)) dxDrawText(Lines, 0, moveY, 375, 518, tocolor(255, 255, 255, 255)) end addEventHandler("onClientRender", getRootElement(), dxDraws) It was behind your panel.
  17. @Ayush Rathore, won't help him. His server sided script is not getting loaded, that's why there is an error.
  18. local giveWeaponT = {} addEventHandler("onPlayerLogin", getRootElement(), function(_, account) if not getAccountData(account, "FirstTime") then setAccountData(account, "FirstTime", true) giveWeaponT[source] = true end end) addEventHandler("onPlayerSpawn", getRootElement(), function() if giveWeaponT[source] theN giveWeaponT[source] = false -- Give weapon end end) I think this one should work.
  19. So the whole video is not being played? Do you mean it's not getting updated on the 3D material? Try to render it on your screen by dxDrawImage.
  20. Buddy, you gotta start checking the scripts, because these errors are easy to fix. local cX, cY, cZ = interpolateBetween( 0, 0, 0, deathZ, 0, 0, deathZ+50, progressC, "InOutQuad") setCameraMatrix(deathX, deathY, cZ)
  21. You could use interpolateBetween for it. function moveCamera() deathX, deathY, deathZ = getElementPosition(source) setCameraMatrix (deathX, deathY, deathZ, deathX, deathY, deathZ+50) startingTime = getTickCount() timeToFinish = 10000 end addEventHandler ("onPlayerWasted", getRootElement(), moveCamera) addEventHandler("onClientRender", getRootElement(), function() local progressC = (getTickCount() - startingTime)/timeToFinish local cX, cY, cZ = interpolateBetween( 0, 0, deathZ 0, 0, deathZ+50 progressC, "InOutQuad") setCameraMatrix(deathX, deathY, cZ) end) I think this one should work.
  22. function ujraeledes() local varjalMar = setTimer( function() spawnPlayer (source, 0, 0, 0) setCameraTarget (source, source) fadeCamera (source, true) triggerClientEvent ("stopHalalMusic", source) end, 120000, 1) end
  23. Did you try to render the image on your screen with dxDrawImage?
  24. triggerClientEvent(source, "openLevelW", source, openLevelW)
  25. Can you send your server sided script where you call the openLevelW event?
×
×
  • Create New...