Jump to content

isa_Khamdan

Members
  • Posts

    484
  • Joined

  • Last visited

Everything posted by isa_Khamdan

  1. Can you explain what is the problem exactly?
  2. There is one Small problem It only destroy the vehicles if a player is driving it else get element type show error after destroying the vehicle [00:13:14] WARNING: test1\SafeZone.lua:16: Bad argument @ 'getElementType' [Expected element at argument 1] Edit: It works but if someone create a vehicle from the freeroam it will never get destroyed if the player didn't enter it.
  3. Can you tell me how to make one? Else there is a problem with the Destroy Function it show that error " Expected Element at Argument 1 " Is that because there is no event handler?
  4. Use Driver Doctor , It will find all needed drivers and download/install them. Edit: There are many programs can do the same job but you have to search for them and the problem you are getting for not being able to install the drivers because your laptop created for windows 8 and the company give Drivers CD for windows 8 only and these setups don't work on older windows like 7 so you have to search for each driver and install it OR use a program to find them and install them for you.
  5. أتعب على نفسك , الناس مو فاضيه تسوي اللي تبغيه
  6. Is that right? local Line1 = createColCircle ( 1800.2021484375, 1714.71691, 1000) function Destroy( element ) local Speed = getElementSpeed( element ) if getElementType ( element ) == "vehicle" then if Speed == 0 then destroyElement( element ) end end end addEvent ( "Destroy", true ) function DSC( element ) if source == Line1 then if getElementType ( element ) == "vehicle" then if ( isElementWithinColShape( element, source ) ) then local Timer = setTimer ( Destroy , 10000, 0, element ) end end end end addEventHandler ( "onColShapeHit", resourceRoot, DSC ) function DSCDT ( thePlayer ) if source == Line1 then if isTimer ( Timer ) then killTimer ( Timer ) end end end addEventHandler ( "onColShapeLeave", resourceRoot, DSCDT ) function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.8 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end
  7. Change _ to . ( That's your Grid list name "GUIEditor.gridlist[1]" )
  8. lol that's my code just a second and I will post a fix for you Edit: here is it clientsideResourceStart = function() if column then for id,playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1], row, column, getPlayerName(playeritem), false, false) end end end addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart ) function Refresh () guiGridListClear ( GUIEditor_Grid[1] ) if column then for id,playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1], row, column, getPlayerName(playeritem), false, false) end end end addEventHandler ( "onClientPlayerJoin", getRootElement(), Refresh ) addEventHandler ( "onClientPlayerQuit", getRootElement(), Refresh ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), Refresh ) That's should work Edit: else edit the gui Grid list name in the code because it's different than yours.
  9. They may be in the area for a very long time so can I make the timer repeat every 10 seconds or something?
  10. Use onPlayerLogout or Quit , getPedOccupiedVehicle and DestroyElement It's easy and simple
  11. I am not that good in English , so if you are here to say jokes then please leave my thread and stop Spamming it with your replays.
  12. I want it that when the Player is in the safe area and when he stop anytime while he is inside the area the car will be destroyed , the script now only destroy the car if it hit the collshape and the speed is 0
  13. function createExplosionForPlayer ( thePlayer, command ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then return else timer = setTimer ( createJihadForPlayer, 2500, 1, thePlayer, x, y, z ) triggerClientEvent ( "playTheSound", getRootElement(), thePlayer ) setPedAnimation ( thePlayer, "BOMBER","BOM_Plant" ) end end addCommandHandler ( "c1", createExplosionForPlayer ) function createJihadForPlayer ( thePlayer, x, y, z ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then return else local x, y, z = getElementPosition ( thePlayer ) local createdExplosion = createExplosion ( x, y, z, 2 ) local createdExplosion = createExplosion ( x, y, z, 3 ) local createdExplosion = createExplosion ( x, y, z, 10 ) if not ( createdExplosion == true ) then outputChatBox ("You cant commit a Jihad in a vehicle!") else outputChatBox ( getPlayerName ( thePlayer ) .." comitted a Jihad!" ) end end end addCommandHandler ( "c2", createJihadForPlayer )
  14. function createExplosionForPlayer ( thePlayer, command ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then return else timer = setTimer ( createJihadForPlayer, 2500, 1, thePlayer, x, y, z ) triggerClientEvent ( "playTheSound", getRootElement(), thePlayer ) setPedAnimation ( thePlayer, "BOMBER","BOM_Plant" ) end end addCommandHandler ( "c1", createExplosionForPlayer ) function createJihadForPlayer ( thePlayer, x, y, z ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then return else local x, y, z = getElementPosition ( thePlayer ) local createdExplosion = createExplosion ( x, y, z, 2 ) local createdExplosion = createExplosion ( x, y, z, 3 ) local createdExplosion = createExplosion ( x, y, z, 10 ) if ( createdExplosion == true ) then outputChatBox ( getPlayerName ( thePlayer ) .." comitted a Jihad!" ) else outputChatBox ("You cant commit a Jihad in a vehicle!") end end end addCommandHandler ( "c2", createJihadForPlayer )
  15. isa_Khamdan

    Break

    for k, v in ipairs(Tag) do if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v["tag"])) then cancelEvent() outputChatBox('#'..v["color1"]..' ' ..v["name"]..' '.. getPlayerName ( source ) .. ' : #'..v["color2"]..''..text..'', getRootElement(), r, g, b, true ) break
  16. Hmm it only destroy the car if you hit the colshape and the speed is 0 local Line1 = createColCircle ( 1800.2021484375, 1714.71691, 1000) function Destroy( element ) local Speed = getElementSpeed( element ) if getElementType ( element ) == "vehicle" then if Speed == 0 then destroyElement( element ) end end end addEvent ( "Destroy", true ) addEventHandler ( "onColShapeHit", resourceRoot, Destroy ) function SafeZoneA( element ) if source == Line1 then if getElementType ( element ) == "vehicle" then if ( isElementWithinColShape( element, source ) ) then outputChatBox ( tostring ( getElementSpeed ( element ) ) ) setTimer ( Destroy , 1000, 1, element ) end end end end addEventHandler ( "onColShapeHit", resourceRoot, SafeZoneA ) function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.8 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end
  17. I searched the Wiki but I didn't find anything about execute Function
  18. ----------- local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then Return --------- Use isPedInVehicle if the script in Client side.
  19. Check if the Player is in Vehicle and if yes then Return the Function.
  20. This should work? local Line1 = createColRectangle ( -1318.4671630859, -189.9077911377, 1000, 1000) function Destroy( element ) local Speed = getElementSpeed( element ) if getElementType ( element ) == "vehicle" then if Speed == 0 then destroyElement( element ) end end end addEvent ( "Destroy", true ) addEventHandler ( "onColShapeHit", resourceRoot, Destroy ) function SafeZoneA( element ) if source == Line1 then if getElementType ( element ) == "vehicle" then if ( isElementWithinColShape( element, source ) ) then setTimer ( triggerEvent , 5000, 1, Destroy ) end end end end end addEventHandler ( "onColShapeHit", resourceRoot, SafeZoneA ) function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.8 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end
  21. How can I make a timer like this? I made the Function function Destroy( element ) local Speed = getElementSpeed( element ) if getElementType ( element ) == "vehicle" then if Speed == 0 then destroyElement( element ) end end end
×
×
  • Create New...