Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. I already tried this way but i out with the same error, Bad argument @'setElementPosition' [Expected vector3 at argument it do the same as setElementPosition(source,x, y, z)
  2. I am scripting an warper system everything scripted fine,but i face a small problem in same time bigger, when selecte the location from gridlist it warps me underground at the place near farm. Currently it just take cash without warping plus warning. WARNING: Bad argument @'setElementPosition' [Expected bool at argument 5, got number '0'] --It's part of the script ,server side: --name , city, price, x, y, z local theTable = { {"LVPD", "LV", 1200, 2221.2431640625, 2468.7631835938, 10.8203125}, {"Hospital", "Las Venturas Airport", 1100, 1625.0001220703, 1850.4322509766, 0.8203125}, {"AP", "Las Venturas Airport", 2300, 1730.140625, 1480.3857421875, 10.81282043457}, {"AMM", "Come-A-Lot", 2000, 2099.7961425781, 967.29669189453, 10.81282043457} } addEvent ("bus:warpplayer",true) addEventHandler ("bus:warpplayer",root, function (cityname,price,x,y,z) if ( getPlayerMoney ( source ) < tonumber(price) ) then outputChatBox("You need ".. tonumber(price).."$ to use this service.", source, 255,0,0) else takePlayerMoney (source, tonumber(price)) setElementPosition(source, x,y,z,0,0,0) end end)
  3. About markers you have to use Table about errors/warnings try to change hitElement by source
  4. This function just remove rows not selected rows
  5. Well, im scripting a simple shop ,using tables and guiGridLists ,But when i selecte an item in Table 1 then i go to Table 2 to buy something from this table, After clicking on buy button i buy from Table 1 & 2 in same time i mean all selected gridlists, i want if i selected the gridlist or clicked on another table the first selected item be removed.
  6. Hey guys, Anyone know which function can i use to remove the selection of an row when i hit another GridList? I am using 2 Tables and adding GridList in each table but when i selecte to buy item from second GridList it buy from the first grid and second one. Thanks in advance
  7. Try to fix your language to let us understand what you need exactly
  8. How many objects you used? Over 1000 for sure
  9. KariiiM

    dxLogin

    You tried that? If is your problem the edit box doesn't showing so this must works
  10. you mean marker? or market? Put your code
  11. KariiiM

    dxLogin

    Try this function loggingMenu () loginuseredit = guiCreateEdit(181, 584, 156, 25, "Username....", true) loginpassedit = guiCreateEdit(181, 654, 156, 25, "Password", true) guiEditSetMasked(loginpassedit, true) playbtn = guiCreateButton(150, 704, 177, 50, "Play", false) guiSetAlpha(playbtn, 0.00) end
  12. KariiiM

    HELP!

    I have no idea about what you want to do
  13. addEventHandler("onClientPlayerWasted", localPlayer, function() if isElement(blp) then destroyElement(blp) end if isElement(mkr) then removeEventHandler("onClientMarkerHit",mkr,Done) destroyElement(mkr) end end)
  14. KariiiM

    HELP!

    function dx_1() dxDrawRectangle(459, 0, 428, 37, tocolor(0, 0, 0, 181), false) dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Don't forget to check out the site zombie-stampede.enjin.com", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end function dx_2() dxDrawRectangle(459, 0, 398, 53, tocolor(0, 0, 0, 181), false) dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Lets keep the server running help support the server with a", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("small donation. You will be rewarded.", 472, 28, 847, 47, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end function dx_3() dxDrawRectangle(508, 0, 257, 33, tocolor(0, 0, 0, 181), false) dxDrawText("*INFO*", 518, 4, 556, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Remember to read the rules at F1.", 568, 4, 927, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end function dx1() addEventHandler("onClientRender", root, dx_1) setTimer(function() removeEventHandler("onClientRender", root, dx_1) end, 1000, 1) end dx1() function dx2() addEventHandler("onClientRender", root, dx_2) setTimer(function() removeEventHandler("onClientRender", root, dx_2) end, 2000, 1) end dx2() function dx3() addEventHandler("onClientRender", root, dx_3) setTimer(function() removeEventHandler("onClientRender", root, dx_3) end, 3000, 1) end dx3()
  15. KariiiM

    HELP!

    Try this function dx_1() dxDrawRectangle(459, 0, 428, 37, tocolor(0, 0, 0, 181), false) dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Don't forget to check out the site zombie-stampede.enjin.com", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end function dx_2() dxDrawRectangle(459, 0, 398, 53, tocolor(0, 0, 0, 181), false) dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Lets keep the server running help support the server with a", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("small donation. You will be rewarded.", 472, 28, 847, 47, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end function dx_3() dxDrawRectangle(508, 0, 257, 33, tocolor(0, 0, 0, 181), false) dxDrawText("*INFO*", 518, 4, 556, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Remember to read the rules at F1.", 568, 4, 927, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end function dx1() addEventHandler("onClientRender", root, dx_1) setTimer(function() removeEventHandler("onClientRender", root, dx_1) end, 1000, 0) end function dx2() addEventHandler("onClientRender", root, dx_2) setTimer(function() removeEventHandler("onClientRender", root, dx_2) end, 2000, 0) end function dx3() addEventHandler("onClientRender", root, dx_3) setTimer(function() removeEventHandler("onClientRender", root, dx_3) end, 3000, 0) end
  16. Thanks it's great way, can you give an example?
  17. Hello guys,im scripting a simple job,everything scripted well, but i stuck on one thing , i need a good idea about triggering from side to other. To be more clear, this trigger is about givePlayerMoney ,i did it in server side and in client side i did dxDrawImage i want when i hit the marker the money numbers from server side shows in the dxDrawImage and it's in client side ,here's the part of my code: --server side: local reward = math.random (2999,5300) function deliveryDoneJob() destroyElement(burger) destroyElement(myBlip) triggerClientEvent(player,"cash",player,deliveryDoneJob) givePlayerMoney(source,reward) outputChatBox("here's your money" ..reward.. "well done!",source,0,255,231) end addEvent("doneJob", true) addEventHandler("doneJob", root, deliveryDoneJob) --client side: function money() local reward = math.random (4300,5100) end addEvent("cash", true) addEventHandler("cash", client, money) function message() dxDrawText(tonumber(reward).."$",620.0*x,395.0*y,802.0*x,466.0*y,tocolor(255,255,255,255),2.3,"pricedown","left","top",false,false,false) end
  18. It must be like that , setCameraTarget(localPlayer)
  19. KariiiM

    question

    You've to use dxDrawImage to draw an Custom image as crosshair and apply it at the place of the original crosshair. That's all what you need to make custom crosshair. guiGetScreenSize dxDrawImage getPedTargetEnd getScreenFromWorldPosition
  20. KariiiM

    blip

    Hey,meta is not correct, it should be like that. "me" type="script">
  21. Do you mean, you want to Host a server from your Computer by openning ports? If that what you mean, it will cause lags 2nd thing, Downloading client folders gonna be too slow and also you can't let your Computer online 24/7 like host's job for sure.
  22. Hello Rontea, first of all you have to learn Lua basic before start scripting anything about MTA When you get Lua well, then start reading Wiki (Wiki is your friend), About server hosting you can host your server from here http://www.multitheftauto.com/hosters/ You can add me in skype: karim.sbai7 if you need more questions
×
×
  • Create New...