Jump to content

ALw7sH

Members
  • Posts

    1,165
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ALw7sH

  1. You mean you want to hide client files? If that's what you mean then use cache="true" in meta e.g
  2. Here is a solution local amount = (type(tonumber(amount)) == "number") and math.floor(tonumber(amount))
  3. ALw7sH

    Images

    You have to ways make your image bigger using photoshop or anyother programe or just don't change the size of your design and that's what I like to do so I just make with position fit with all resloutions
  4. فنكشن guiGridListSetItemData فيه ارقمنت واحد للداتا وانت جالس تستخدم ثلاثه خل الداتا جدول guiGridListSetItemData ( agrid, r, 1, {tonumber ( v[2] ), tonumber ( v[3] ), tonumber ( v[4] )} ) وغير سطر 54 الى local x, y, z = unpack(guiGridListGetItemData ( agrid, sel, 1 ))
  5. Oh I haven't seen the delete command Here you go addCommandHandler("sting", function(player) if (player) then local x, y, z = getElementPosition(player) local spike = createObject(2892,x+2,y+2,z-0.9) setElementData(player,"spike",spike) local x2, y2, z2 = getElementPosition(spike) local blow = createColSphere(x2, y2, z2, 3) setElementParent(blow,spike) local AnimationDuration = 1000 -- Measure your animation's duration in miliseconds setPedAnimation( player, "PED", "IDLE_CHAT", 1, false, true, true, true, false ) setTimer(setPedAnimation,AnimationDuration,1,source) addEventHandler("onColShapeHit",blow, function (player) if player and getElementType(player) == "player" then if isPedInVehicle(player) then local pveh = getPedOccupiedVehicle(player) setVehicleWheelStates(pveh,1,1,1,1) addEventHandler("onColShapeHit") destroyElement ( getElementData(player,"spike") ) destroyElement ( source ) end end end) end end ) addCommandHandler("tale", function(player) local spike = getElementData(player,"spike") if (spike) then destroyElement ( getElementParent(spike) ) destroyElement ( spike ) end end )
  6. delete "element" from line 1 then replace element with source in line 6 change line 3 to local amount = math.floor(tonumber(amount)) because amount is string and you can't use "math.floor" which work only with numbers before you convert amount to number
  7. ALw7sH

    Need Help

    I don't really know, try to search on the mapeditor
  8. ALw7sH

    Need Help

    What's exactly the thing that you don't know how to make it or what you need to make it? since you know the basics then you know the basics of this script too like createing marker,object and the other small things, doesn't you?
  9. ALw7sH

    Need Help

    saw it, not what im looking for.. and i want to learn the scripting.. so wanna try to make it myself Then start with something basic and easy https://wiki.multitheftauto.com/wiki/Sc ... troduction
  10. ALw7sH

    XML

    It could be something with the permission, is the xml files being created by the script ? Edit: Where are you loading your text into the xml file?
  11. ALw7sH

    Need Help

    https://forum.multitheftauto.com/viewtopic.php?f=108&t=35797
  12. استخدم setElementVelocity لسرعة اللاعب افضل
  13. Actully you can, but you have to create your own money system using setElementData getElementData or whatever method you want to Here's an example function buySomthing(element) if getElementData(element) >= 500 then takeElementMoney(element,500) end end -------------- Our new money system function getElementMoney(element) if isElement(element) then return getElementData(element,"Money") or 0 end return false end function setElementMoney(element,money) if isElement(element) and type(money) == "number" then return setElementData(element,"Money",money) end return false end function takeElementMoney(element,money) if isElement(element) and type(money) == "number" then return setElementMoney(element,getElementMoney(element)-money)) end return false end function giveElementMoney(element,money) if isElement(element) and type(money) == "number" then return setElementMoney(element,getElementMoney(element)+money)) end return false end
  14. local markers = { ["Mechanic"] = createMarker(...), ["Medic"] = createMarker(...), ["Police"] = createMarker(...), } function anFunction(player,duty) setElementVisibleTo(markers[duty],player,true) for k,v in pairs(markers) do if k ~= duty then setElementVisibleTo(v,player,false) end end end anFunction(getRandomPlayer(),"Police") Is that what you mean?
  15. addCommandHandler("sting", function(player) if (player) then local x, y, z = getElementPosition(player) local spike = createObject(2892,x+2,y+2,z-0.9) setElementData(player,"spike",spike) local x2, y2, z2 = getElementPosition(spike) local blow = createColSphere(x2, y2, z2, 3) local AnimationDuration = 1000 -- Measure your animation's duration in miliseconds setPedAnimation( player, "PED", "IDLE_CHAT", 1, false, true, true, true, false ) setTimer(setPedAnimation,AnimationDuration,1,source) addEventHandler("onColShapeHit",blow, function (player) if player and getElementType(player) == "player" then if isPedInVehicle(player) then local pveh = getPedOccupiedVehicle(player) setVehicleWheelStates(pveh,1,1,1,1) addEventHandler("onColShapeHit") destroyElement ( getElementData(player,"spike") ) destroyElement ( source ) end end end) end end ) addCommandHandler("tale", function(takeoff) if (player) then destroyElement ( spike ) destroyElement ( source ) end end )
  16. addCommandHandler("sting", function(player) if (player) then local x, y, z = getElementPosition(player) local spike = createObject(2892,x+2,y+2,z-0.9) local x2, y2, z2 = getElementPosition(spike) local blow = createColSphere(x2, y2, z2, 3) local AnimationDuration = 1000 -- Measure your animation's duration in miliseconds setPedAnimation( player, "PED", "IDLE_CHAT", 1, false, true, true, true, false ) setTimer(setPedAnimation,AnimationDuration,1,source) addEventHandler("onColShapeHit",blow, function (player) if player and getElementType(player) == "player" then if isPedInVehicle(player) then local pveh = getPedOccupiedVehicle(player) setVehicleWheelStates(pveh,1,1,1,1) addEventHandler("onColShapeHit") destroyElement ( spike ) destroyElement ( source ) end end end) end end ) addCommandHandler("tale", function(takeoff) if (player) then destroyElement ( spike ) destroyElement ( source ) end end )
  17. debugstring 3 واكتب الأخطاء الي تجيك
  18. function isPlayerNameExists(thePlayer) local isExists = dbQuery(database,"SELECT * FROM players WHERE playerName="..getPlayerName(thePlayer).."") local result = dbPoll(isExists,-1) return (result == "table" and #result > 0) and true or false end
  19. ALw7sH

    OOP ?

    الفكره ماهي انك تفعل ال او او بي وتستعمله عادي ولا كأنه شي تغير لول شوف ذي الروابط http://lua-users.org/wiki/ObjectOrientedProgramming http://lua-users.org/wiki/ObjectOrientedProgramming وشوف ذا السكربت https://forum.multitheftauto.com/viewtopic.php?f ... 05#p844230 الكود ممكن يكون احسن بس خبرتي في الاو او بي ماهي قويه وتقدر تشوف سكربت ويب براوزر الي تلقاه في المودات الاساسيه لانه مكتوب ب أو او بي وذا السكربت بعد مكتوب ب أو او بي https://github.com/HorrorClown/MTAGoJump
  20. and it's still being doubled?
  21. If the freeroam is running that's why thr messages being double
  22. local player = getRandomPlayer() -- اختار لاعب عشوائي من كل اللاعبين الي في السيرفر local vehicle = getPedOccupiedVehicle(player) -- احاول اجيب سيارته if vehicle then -- اتحقق لو الفنكشن الي فوق رجع لي سياره اللاعب ولا لا (لو اللاعب ماهو راكب سياره الفنكشن بيرجع لي فولس) local players = getVehicleOccupants(vehicle) -- اجيب كل اللاعبين الي بالسياره (الي راكبين معى اللاعب العشوائي) for k,v in ipairs(players) do -- نسويلهم لوب لانه الفنكشن بيرجع لي جدول باللاعبين الي راكبين السياره givePlayerMoney(v,5000) -- اعطي اللاعب فلوس end end
  23. local accountsWhitelist = { ["ALw7sH"] = true, } function openWindow(player) local account = getPlayerAccount(player) if not isGuestAccount(account) then if accountsWhitelist[getPlayerAccount(account)] then triggerClientEvent(player,"onPlayerWantToShowWindow",player) end end end addCommandHandler("window",openWindow) ممكن توريني وين احتاج getAccount ? معى العلم ذا طلب صاحب الموضوع
×
×
  • Create New...