Jump to content

ALw7sH

Members
  • Posts

    1,165
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ALw7sH

  1. Can you explain more what you want to do?
  2. This is much better and easier local Table = { ["Serial1"] = {data1="test1",data="test2"}, ["Serial2"] = {data1="test1",data="test2"}, } print(Table["Serial1"].data1) -- test1 print(Table["Serial2"].data2) -- test2 local MySerial = "Serial2" for serial,datas in pairs(Table) do if serial == MySerial then print(datas.data1) -- test1 for k,data in pairs(datas) do print(data) -- test1 then test2 end end end
  3. ALw7sH

    i need help

    viewtopic.php?f=167&t=77524
  4. vehicles لوب لجدول
  5. ALw7sH

    Trip mine script

    debugscript? and what's doesn't works exactly we cant help you if we dont know what's the problem
  6. addEventHandler( "onPlayerSpawn", root, function ( ) if getPlayerTeam ( source ) and getTeamName(getPlayerTeam ( source )) == "Heavy" then setPedArmor( source,100 ) end end )
  7. ALw7sH

    Trip mine script

    yes, it's server side
  8. your function arguments is player,text but you are calling the function with just a text exports.notif:showBarNoti("#ff0000This is a notification test") should be exports.notif:showBarNoti(playerHere,"#ff0000This is a notification test")
  9. local object1 = createObject(9585, -2040.5999755859, 1442, 7, 0, 0, 0) local obj1X, obj1Y, obj1Z = getElementPosition(object1) local object2 = createObject(9586, obj1X-2.2998046875, obj1Y, obj1Z+10.1, 0, 0, 0) local object3 = createObject(9584, obj1X+20.400390625, obj1Y, obj1Z+17, 0, 0, 0) local object4 = createObject(9698, obj1X+31.9, obj1Y-1.17, obj1Z+19.9, 0, 0, 0) attachElements(object2,object1,-2.2998046875,0,10.1) -- attach object2 to object1 attachElements(object3,object1,20.400390625,0,17) -- attach object2 to object1 attachElements(object4,object1,31.9,-1.17,19.9) -- attach object2 to object1 local moveTable = { --{time, x, y, z, rotX, rotY, rotZ}, {60000, -2040.59, 1598.5, 7, 0, 0, 0}, {60000, -3111.19, 1764.19, 7, 0, 0, 180}, {60000, -3204.80, -2873.5, 7, 0, 0, 270}, } function move() for k,v in ipairs(moveTable) do if k == 1 then moveObject(object1, unpack(v)) else local time = 0 if k ~= 2 then for i=1,k-1 do time = time + moveTable[i][1] end else time = moveTable[1][1] end setTimer(moveObject,time,1,object1, unpack(v)) end end end function moveGate(playerSource, cmd) if cmd == "gostart" then if isAclGroup(playerSource,"Maritime") then move() end end end addCommandHandler("gostart", moveGate)
  10. lol i forgot to put , on the table, sorry about that local moveTable = { --{time, x, y, z, rotX, rotY, rotZ}, {70000, -1377.90, 193.69, 6.90, 0, 0, 45}, {60000, -1150.40, 475.10, 6.90, 0, 0, 60}, {60000, -1196.19, 648.5, 6.90, 0, 0, 120}, } function move() for k,v in ipairs(moveTable) do if k == 1 then moveObject(object1, unpack(v)) else local time = 0 if k ~= 2 then for i=k-1,1 do time = time + moveTable[i][1] end else time = moveTable[1][1] end setTimer(moveObject,time,1, unpack(v)) end end end function moveGate(playerSource, cmd) if cmd == "gostart" then if isAclGroup(playerSource,"Maritime") then move() end end end addCommandHandler("gostart", moveGate)
  11. ALw7sH

    Trip mine script

    the command is working but you cant see the colshape because the colshape position is worng and you cannot choose the width and high you have used sphere colshaope anyway try that code it should works fine function Object ( name ) createObject ( 1211, -1467.2827, -1287.6701, 99.15, 0, 0, 0 ) -- this creates an object colShape = createColSphere ( -1467, -1287.6701, 99.15, 2 ) -- the last argument is the size of the colshape end addEventHandler ( "onResourceStart", resourceRoot, Object ) function Mine(thePlayer, matchingDimension) if source == colShape then local pX, pY, pZ = getElementPosition ( thePlayer ) -- get the player's position createExplosion ( pX, pY, pZ, 6, source ) -- and create an explosion there outputChatBox("You stepped on a Mine!",colShape,255,109 ,109 ) -- outputs a chatbox end end addEventHandler("onColShapeHit",root,Mine)
  12. You didn't get it so i have made an easier code for you local moveTable = { --{time, x, y, z, rotX, rotY, rotZ} {70000, -1377.90, 193.69, 6.90, 0, 0, 45} {60000, -1150.40, 475.10, 6.90, 0, 0, 60} {60000, -1196.19, 648.5, 6.90, 0, 0, 120} } function move() for k,v in ipairs(moveTable) do if k == 1 then moveObject(object1, unpack(v)) else local time = 0 if k ~= 2 then for i=k-1,1 do time = time + moveTable[i][1] end else time = moveTable[1][1] end setTimer(moveObject,time,1, unpack(v)) end end end function moveGate(playerSource, cmd) if cmd == "gostart" then if isAclGroup(playerSource,"Maritime") then move() end end end addCommandHandler("gostart", moveGate)
  13. ALw7sH

    Trip mine script

    you should enable the DevelopmentMode using this function setDevelopmentMode before you use the command then use the command like that showcol 1
  14. ALw7sH

    Trip mine script

    Make sure that your colshape positions is right you can use this command showcol
  15. ALw7sH

    Trip mine script

    function Object ( name ) createObject ( 1211, -1467.2827, -1287.6701, 99.15, 0, 0, 0 ) -- this creates an object colShape = createColSphere ( -1467, -1467, 99.15, 1 ) end addEventHandler ( "onResourceStart", resourceRoot, Object ) function Mine(thePlayer, matchingDimension) if source == colShape then local pX, pY, pZ = getElementPosition ( thePlayer ) -- get the player's position createExplosion ( pX, pY, pZ, 6, source ) -- and create an explosion there outputChatBox("You stepped on a Mine!",colShape,255,109 ,109 ) -- outputs a chatbox end end addEventHandler("onColShapeHit",root,Mine)
  16. ALw7sH

    Trip mine script

    the col shape should be out the hit function function Object ( name ) createObject ( 1211, -1467.2827, -1287.6701, 99.15, 0, 0, 0 ) -- this creates an object colShape = createColSphere ( -1467, -1467, 99.15, 1 ) end addEventHandler ( "onResourceStart", resourceRoot, Object ) function Mine(thePlayer, matchingDimension) local pX, pY, pZ = getElementPosition ( source ) -- get the player's position createExplosion ( pX, pY, pZ, 6, source ) -- and create an explosion there outputChatBox("You stepped on a Mine!",colShape,255,109 ,109 ) -- outputs a chatbox end addEventHandler("onColShapeHit",colShape,Mine)
  17. هو الافضل انك تستخدم الايفنت الي في القيم مود حقك لو فيه local Money = 240 local MarkerMoney = createMarker(1970, -1443.1, 23.2, "cylinder", 2.0, 24, 230, 228, 255) addEventHandler("onMarkerHit", resourceRoot, function(player) if MarkerMoney then if source == MarkerMoney then if getElementType(player) == "player" and not isPedInVehicle(player) then givePlayerMoney(player, Money) destroyElement(MarkerMoney) end end end end) addEventHandler("onResourceStop", root, function(res) if getResourceInfo(res, "type") == "map" then if not MarkerMoney then if getElementType(MarkerMoney) =~ "marker" then MarkerMoney = createMarker(1970, -1443.1, 23.2, "cylinder", 2.0, 24, 230, 228, 255) end end end end)
  18. ALw7sH

    cancelevent

    if Button then ??? why you are checking the button if this event triggered when button clicked
  19. return لو حطيت خلاص السكربت مابيواصل قراءة الفنكشن -- من هنا وتحت مابيفيدك الا لو تبي تصنع فنكشن -- مثلاً return ولو حطيت قيمة بعد ال function test() return true end واستخدمت الفنكشن nvm = test() print(tostring(nvm)) true القيمة الي بيرجعها الفنكشن هي
  20. ??? ليه تتحقق من انه اللاعب لاعب يعني تعتقد الاوبجكتات او الماركرات تقدر تكتب في الشات ؟ ._. onPlayerChat الكود ماعدا ذا الشي صح والمفروض يشتغل
  21. ALw7sH

    Trip mine script

    no, but you can create Radar-area in the same position of the col shape so players can see it in radar
  22. yes, you have to use timers function moveGate(playerSource, cmd) if cmd == "gostart" then if isAclGroup(playerSource,"Maritime") then moveObject(object1, 70000, -1377.90, 193.69, 6.90, 0, 0, 45) setTimer( function() moveObject(object1, 60000, -1150.40, 475.10, 6.90, 0, 0, 60) setTimer( function() moveObject(object1, 60000, -1196.19, 648.5, 6.90, 0, 0, 120) end,60000,1) end,70000,1) end end end addCommandHandler("gostart", moveGate)
  23. Copy codes on my reply again
  24. ALw7sH

    cancelevent

    Actully this wont do what he want to do
×
×
  • Create New...