Jump to content

Oussema

Members
  • Posts

    100
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Oussema

  1. edit your code then restart the script
  2. markers = {} local spots = { {2488.32886, -1670.63599, 12.33595}, {2490.92886, -1670.63599, 12.33595}, {2495.92886, -1670.63599, 12.33595} } for k,v in ipairs (spots) do markers[k] = createMarker(v[1],v[2],v[3], "cylinder", 1.2, 22, 22, 22) addEventHandler("onMarkerHit", markers[k], function(hitElement, mtd) local money = getPlayerMoney(hitElement) local hpp = getElementHealth(hitElement) if money >= 1000 and hpp < 100 then setElementHealth(hitElement, 100) takePlayerMoney(hitElement, 1000) elseif money >= 1000 and hpp >= 100 then outputChatBox("Your HP is already full", hitElement, 222, 44, 22) elseif money < 1000 then outputChatBox("You don't have enough money", hitElement, 222, 44, 22) end end i don't see them :v anyway thx now it's gonna work i'm sure
  3. ye all right Edited now it's gonna work , simple fail ahaha
  4. markers = {} local spots = { {2488.32886, -1670.63599, 12.33595}, {2490.92886, -1670.63599, 12.33595}, {2495.92886, -1670.63599, 12.33595} } for k,v in ipairs (spots) do markers[k] = createMarker(v[1],v[2],v[3], "cylinder", 1.2, 22, 22, 22) addEventHandler("onMarkerHit", markers[k], function() local money = getPlayerMoney(hitElement) local hpp = getElementHealth(hitElement) if money >= 1000 and hpp < 100 then setElementHealth(hitElement, 100) takePlayerMoney(hitElement, 1000) elseif money >= 1000 and hpp >= 100 then outputChatBox("Your HP is already full", hitElement, 222, 44, 22) elseif money < 1000 then outputChatBox("You don't have enough money", hitElement, 222, 44, 22) end end) end This gonna work
  5. here is my code local cx,cy = getCursorPosition() local cxx, cyy = ( cx*2 ), ( cy*1.5 ) dxDrawImage(xxOff*cxx, yyOff*cyy, 177, 151, ":MyResource/Files/highlightedMoney.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) the image moves in worng position how i can slove !
  6. you forget to add the code of isPlayerInACl :v function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end function whitelist (thePlayer) local thePlayer = getPlayerAccount if isPlayerInACL(thePlayer, "VIP") then outputChatBox("Access Granted!") else outputChatBox("Access Denied!") end end addCommandHandler("panelvip", whitelist)
  7. Oussema

    Fps drops !

    When i use xmlNodeGetValue then draw it with dxdrawtext fps will be droped to <10 function dxDrawTest () 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 ) dxDrawText(instructions, 0,5, 375, 518, tocolor(255, 255, 255, 255)) end addEventHandler("onClientRender",root,dxDrawTest)
  8. <root> <category title="tab1" id="tab1"> <subcategory title="Test1" id="Test1" > <content> dsqdqsdqsdqsdqsdqsdqsoduqsiopdyzaipdza...ect </content> </subcategory> <subcategory title="Test2" id="Test2" > <content> dsqdsqdqsdsqpodjqsdjqsopoo dsq...............ect </content> </subcategory> <category title="tab2" id="tab2"> <subcategory title="test3" id="test3" > <content> sdqdqsdqsdsqodqsoidsqoiqsdqs <content> </subcategory> </root> how i can get the texts from this xml for example ! i want get texts of tab2 subcategory test3
  9. Oussema

    Dx Scroll

    I sloved it , anyway thx NeXuS <3 how did i fix it ? : from : dxDrawImage(375, 198, 835, 518, renderTarget, 0 ,0 ,0,tocolor(0, 5, 7, 168)) to : dxDrawImage(375, 198, 835, 518, renderTarget, 0 ,0 ,0,tocolor(255, 255, 255, 250))
  10. Oussema

    Dx Scroll

    as you can see in the screen shot everything is fine for me only the text color i want change the text color to white but it won't work pff no errors no anything my code : local renderTarget = dxCreateRenderTarget(835, 518,true) local scrollerW, scrollerH = 13, 50 local Scrolled = 1870 local Size = 60 local moveY = 0 local Lines = [[sqdqsdqsdqsdqsdsq. dsqdqsdqsdqsdqsdqs sqdqsdqsdqsdqsdsqdsqsq qsdqsdqsdqs qsdqsdqsdqsq qs]] function dxDraws() dxSetRenderTarget(renderTarget, true) dxDrawText(Lines, 0, moveY, 375, 518, tocolor(255, 255, 255, 255)) 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)) end addEventHandler("onClientRender", getRootElement(), dxDraws)
  11. the problem not here bro :v if they player download it once then i restart script ! then the error will show but in the first time download it's fine , i want know how to check if the clinet already have the files don't download them , just replace
  12. ok ok Guys i have tried with that : addEvent("startCheckMods",true) addEventHandler("startCheckMods",root,function() for i, v in pairs ( getModsTable () ) do if ( not fileExists(v[2]) ) then downloadFile ( v[2] ) else if v[1] == "txd" then local txd = engineLoadTXD ( v[2],0) if ( not txd or not engineImportTXD ( txd, v[3] ) ) then outputDebugString ( "Failed to replace ".. tostring ( v[2] ).. " (Loading file as .txd | Tryed to replace model "..tostring(v[3])..")" ) end else local dff = engineLoadDFF ( v[2], 0 ) if ( not dff or not engineReplaceModel ( dff, v[3] ) ) then outputDebugString ( "Failed to replace ".. tostring ( v[2] ).. " (Loading file as .dff | Tryed to replace model "..tostring(v[3])..")" ) end end end end end) addEventHandler ( "onClientFileDownloadComplete", root, function ( _, success ) if ( success ) then local modsDone = true for i, v in pairs ( getModsTable() ) do if ( not fileExists ( v[2] ) ) then modsDone = false break end end if ( modsDone ) then for i, v in pairs( getModsTable() ) do if v[1] == "txd" then local txd = engineLoadTXD ( v[2],0) if ( not txd or not engineImportTXD ( txd, v[3] ) ) then outputDebugString ( "Failed to replace ".. tostring ( v[2] ).. " (Loading file as .txd | Tryed to replace model "..tostring(v[3])..")" ) end else local dff = engineLoadDFF ( v[2], 0 ) if ( not dff or not engineReplaceModel ( dff, v[3] ) ) then outputDebugString ( "Failed to replace ".. tostring ( v[2] ).. " (Loading file as .dff | Tryed to replace model "..tostring(v[3])..")" ) end end end end end end ) i got warning : attempt to load "Filename" before onClientFileDownloadComplete
  13. ok look with some tiggers i can understand that but show example if it's more than 5 mods please ? and thx you
  14. WTF man due first i'm not attacking you but really you never understand me and you didn't too look look pls , that you gave me will make the resource start everytime play login :v ok look i logged in the resource start fine , and if another one join hhhhhh ? what resource will do ?!!! anwayway thx bro ! Any another one understand me and can help me pls ?
  15. Are you kidding me dude ?!! lol who will start the resource ? my mom !!! you think i want know how to start the resource ? lol man ok i'll take you like your brain I want this script download the mods only when the player login so that he can play same time the mods are downloading.. it's not just 1 mod or 2 it's more than 10+ mods did you understand now ?
  16. the resource will not stop dude -__- Comon open your brain and read the full topic pls
  17. Read all pls :v "But the problem is that with more mods i add it is raising the ammount of MB that the player has to download."
  18. I Have this simple script to download and replace vehicle mods: function replaceModel() txd = engineLoadTXD("429.txd", 429 ) engineImportTXD(txd, 429) dff = engineLoadDFF("429.dff", 429 ) engineReplaceModel(dff, 429) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) But the problem is that with more mods i add it is raising the ammount of MB that the player has to download. That script downloads mods and after that the player can join the game I want is a script that only downloads the mods when the player login so that he can play same time the mods are downloading.. i saw somthing like adding mods in the Meta with attribute: download = "false" And downloadFile after the player logs in for example. but i have no idea about that so anyone tell me ? i hope u can help me , Thanks .
  19. Oussema

    Punch Hand

    Is there way to disable Punch Hand ? i won't disable damage i want make the player can't Punch Hand
  20. Oussema

    Complie

    my code has 500 line + and i tested ig full functions and everything no errors , no nothing i won't share it pfff i'll keep checking the erors and i'll check everyline , line by line
  21. Oussema

    Complie

    i check it 500 times and no errors
  22. Oussema

    Complie

    luac.mtasa says ERROR Could not compile file , what is the problem ? my clinet side that i want complie don't have any syntax error
×
×
  • Create New...