Jump to content

joedajoester

Members
  • Posts

    256
  • Joined

  • Last visited

Everything posted by joedajoester

  1. I get the problem, its that ajax isnt running because theres a duplicate and didnt get much time to do it all today.
  2. i get error cannot link resource to ajax for some resources. What is that? How do i fix it but ajax is there
  3. I did try that today, but did it for mta 1.2 by accident so i gave up with that, and i started removing webstats and i get error cannot link resource to ajax. Im doing it now for mta 1.1
  4. When i do that, i made a folder [freeroam+] and i get errors like not processing "webstats" as it has duplicates on different paths. It does it for other resources also like, play and i just get a black screen. Now what?
  5. Hi all, i downloaded freeroam+ viewtopic.php?f=108&t=35910&start=60 i cannot figure out where to place it in the resource folder, please help me
  6. joedajoester

    simple help

    Hi, i want to get freeroam+ anyone know how to use it in my server? I downloaded it with svn and now i cannot figure out how to put it in resource folder. Please help viewtopic.php?f=108&t=35910&start=60 if u guys need more info tell me please :>
  7. It uses dxdraw and I cant do that with Map. Can you make the script automatically startup with a few mines made like to guard an admin base and the script automatically has the mines in place
  8. Ahh i need the script to start with mines allready made the way from the script and when someone walks in it it will do something like explosion somewhere or setposition somewhere else i need it so i can define where it will create the "mines" theyre called mines but they are kinda lasers try the script ull know wat i mean
  9. I need the script to start up with the lasers automatically created
  10. Instead of ingame useing the script, can the script have it set automatically? So i dont have to manually do it every time
  11. joedajoester

    help

    Hi all, this script is in mta community i just edited it, i dont own it. I need it to have it so its not manual to create the lasers, the script does it automatically and after a few seconds they come back. i dont know how to do it lol please help me g_Mines = { } g_Plant = false g_Distance = 6000 g_Radius = 2 function plantCommand() showCursor ( true ) g_Plant = true end addCommandHandler("p", plantCommand) function onClientClick ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if(g_Plant) then plantRequest( absoluteX, absoluteY) showCursor ( false ) g_Plant = false end end addEventHandler ( "onClientClick", getRootElement(), onClientClick ) function plantRequest(w, h) local tx, ty, tz = getWorldFromScreenPosition ( w, h, g_Distance ) local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, tx, ty, tz, true, true, true, true, true, false, false, false, getLocalPlayer() ) if hit then triggerServerEvent ( "onCreateMine", getRootElement(), x, y, z ) end end function getTopPointRelativeOfElement(element,distance) local x, y, z = getElementPosition ( element ) local rx, ry, rz = getElementRotation ( element ) y = y - (distance * math.sin(math.rad(rx)) ) x = x + (distance * math.sin(math.rad(ry)) ) z = z + (distance * math.cos(math.rad(rx+ry)) ) return x,y,z end function onClientRender ( ) for k, v in ipairs(g_Mines) do processLaserMine ( k, v , g_Distance ) end end addEventHandler("onClientRender",getRootElement(), onClientRender) function processLaserMine(index, mine, distance) if ( isElement(mine) and getElementType (mine) == "object" ) then local x1, y1, z1 = getElementPosition ( mine ) local xp, yp, zp = getTopPointRelativeOfElement( mine, 0.1 ) local xt, yt, zt = getTopPointRelativeOfElement( mine, distance ) local hit, x2, y2, z2, elementHit = processLineOfSight ( xp, yp, zp, xt, yt, zt, true, true, true, true, true, false, false, false, mine ) if(elementHit) then explodeMine(index, mine, x1, y1, z1) end if(hit) then dxDrawLine3D ( x1, y1, z1, x2, y2, z2, tocolor ( 255, 0, 0, 0xAA ),1) else dxDrawLine3D ( x1, y1, z1, xt, yt, zt, tocolor ( 255, 0, 0, 0xAA ),1) end return true end return false end function onClientExplosion(x,y,z,type) -- explodeMine(0,nil,x,y,z) end addEventHandler("onClientExplosion",getRootElement(),onClientExplosion) function explodeMine(index, mine, x, y, z) if(isElement(mine)) then createExplosion ( 0, 0, 0, 3 ) createExplosion ( 11, 1, 4, 3 ) createExplosion ( 0, 0, 3, 3 ) table.remove(g_Mines,index) destroyElement(mine) end for k, v in ipairs(g_Mines) do local x2, y2, z2 = getElementPosition(v) if(getDistanceBetweenPoints3D ( x, y, z, x2, y2, z2 ) <= (g_Radius*2) ) then explodeMine(k, v, x2, y2, z2) end end end local checkSize = 0.1 function lowHitCheck(x,y,z,name) local t = checkSize if(name == "xu") then if isLineOfSightClear ( x+t, y, z, x+t/10, y, z ) and not isLineOfSightClear ( x+t, y+t, z, x-t, y-t, z ) and not isLineOfSightClear ( x+t, y-t, z, x-t, y+t, z ) and not isLineOfSightClear ( x+t, y, z+t, x-t, y, z-t ) and not isLineOfSightClear ( x+t, y, z-t, x-t, y, z+t ) then return true end elseif(name == "xd") then if isLineOfSightClear ( x-t, y, z, x-t/10, y, z ) and not isLineOfSightClear ( x-t, y+t, z, x+t, y-t, z ) and not isLineOfSightClear ( x-t, y-t, z, x+t, y+t, z ) and not isLineOfSightClear ( x-t, y, z+t, x+t, y, z-t ) and not isLineOfSightClear ( x-t, y, z-t, x+t, y, z+t ) then return true end elseif(name == "yu") then if isLineOfSightClear ( x, y+t, z, x, y+t/10, z ) and not isLineOfSightClear ( x+t, y+t, z, x-t, y-t, z ) and not isLineOfSightClear ( x-t, y+t, z, x+t, y-t, z ) and not isLineOfSightClear ( x, y+t, z+t, x, y-t, z-t ) and not isLineOfSightClear ( x, y+t, z-t, x, y-t, z+t ) then return true end elseif(name == "yd") then if isLineOfSightClear ( x, y-t, z, x, y-t/10, z ) and not isLineOfSightClear ( x+t, y-t, z, x-t, y+t, z ) and not isLineOfSightClear ( x-t, y-t, z, x+t, y+t, z ) and not isLineOfSightClear ( x, y-t, z+t, x, y+t, z-t ) and not isLineOfSightClear ( x, y-t, z-t, x, y+t, z+t ) then return true end elseif(name == "zu") then if isLineOfSightClear ( x, y, z+t, x, y, z+t/10 ) and not isLineOfSightClear ( x+t, y, z+t, x+t, y, z-t ) and not isLineOfSightClear ( x-t, y, z+t, x-t, y, z-t ) and not isLineOfSightClear ( x, y+t, z+t, x, y+t, z-t ) and not isLineOfSightClear ( x, y-t, z+t, x, y-t, z-t ) then return true end elseif(name == "zd") then if isLineOfSightClear ( x, y, z-t, x, y, z-t/10 ) and not isLineOfSightClear ( x+t, y, z-t, x+t, y, z+t ) and not isLineOfSightClear ( x-t, y, z-t, x-t, y, z+t ) and not isLineOfSightClear ( x, y+t, z-t, x, y+t, z+t ) and not isLineOfSightClear ( x, y-t, z-t, x, y-t, z+t ) then return true end end return false end function toang(value) if(value > 360.0) then while(value > 360.0) do value = value - 360.0 end elseif(value < 0.0) then while(value < 0.0) do value = value + 360.0 end end return value; end function lowHitGetNormal(x,y,z,name) local rx, ry, rz = 0, 0, 0 local t = checkSize if(name == "xu") then rx, ry, rz = 0, 90, 0 elseif(name == "xd") then rx, ry, rz = 0, 270, 0 elseif(name == "yu") then rx, ry, rz = 270, 0, 0 elseif(name == "yd") then rx, ry, rz = 90, 0, 0 elseif(name == "zu") then rx, ry, rz = 0, 0, 0 --hit, x1, y1, z1, elementHit = processLineOfSight ( x, y+t, z+t, x, y+t, z-t ) --rx = toang( math.deg( math.atan2(t,t-z1) ) ) --outputChatBox("ang=" .. rx ) elseif(name == "zd") then rx, ry, rz = 180, 0, 0 end return rx, ry, rz end function getPointNormal(x, y, z) local rx, ry, rz = 0, 0, 0 if lowHitCheck(x,y,z,"zu") then rx, ry, rz = lowHitGetNormal(x,y,z,"zu") elseif lowHitCheck(x,y,z,"zd") then rx, ry, rz = lowHitGetNormal(x,y,z,"zd") elseif lowHitCheck(x,y,z,"xu") then rx, ry, rz = lowHitGetNormal(x,y,z,"xu") elseif lowHitCheck(x,y,z,"xd") then rx, ry, rz = lowHitGetNormal(x,y,z,"xd") elseif lowHitCheck(x,y,z,"yu") then rx, ry, rz = lowHitGetNormal(x,y,z,"yu") elseif lowHitCheck(x,y,z,"yd") then rx, ry, rz = lowHitGetNormal(x,y,z,"yd") end return rx, ry, rz end function getNormalPlane3(x1,y1,z1,x2,y2,z2,x3,y3,z3) end function onCreateMine( x, y, z ) local rx,ry,rz = getPointNormal ( x, y, z ) local mine = createObject ( 1213, x, y, z ) if(getDistanceBetweenPoints3D ( x, y, z, getElementPosition(getLocalPlayer())) <= 10 ) then local sound = playSound3D ( "plant.wav", getElementPosition(mine) ) setSoundMaxDistance ( sound, 10 ) end setObjectStatic ( mine, true ) table.insert ( g_Mines, mine ) setElementRotation ( mine, rx, ry, rz ) end addEvent( "onCreateMine", true ) addEventHandler( "onCreateMine", getRootElement(), onCreateMine )
  12. bad element pointer @ getElementPosition when i shoot the ped he dissapears and doesnt spawn back
  13. I tried it and error: bad argument @ destroyElement I copied the last line in script and changed respawn to destroyElement
  14. It works, but the dead body is on the ground lol can it destroyElement onPedWasted?
  15. this doesnt work i get no error function getPlayerFromPartOfName(playerPart) local pl = getPlayerFromName(playerPart) if isElement(pl) then return pl else for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end end function Jail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",player,255,0,0) return end setElementData(thePlayer, "jailSkin", getElementModel ( thePlayer )) setElementModel ( thePlayer, 22 ) setElementPosition ( thePlayer, 52, 2483, 21 ) takeAllWeapons ( getRootElement() ) setElementData ( thePlayer, "isJailed", true ) outputChatBox (name.." has been jailed", getRootElement(), 255, 0, 0, true ) else outputChatBox ("You cannot use this command!", player, 255, 0, 0, true ) end end addCommandHandler("jail",Jail) function Unjail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if not getElementData( thePlayer, "isJailed") then outputChatBox("This player is not in jail.",player,255,0,0) return end setElementPosition ( thePlayer, 72, 2484, 16.3 ) setElementModel ( thePlayer, tonumber(getElementData(thePlayer,"jailSkin"))) setElementData ( thePlayer, "isJailed", false ) outputChatBox (name.." has been unjailed. Be good now, "..name, getRootElement(), 0, 255, 0, true ) else outputChatBox ("You cannot unjail yourself!", player, 255, 0, 0, true ) end end addCommandHandler("unjail",Unjail) ped1inside = createPed ( 71, 69, 2503, 17) setPedRotation (ped1inside, 180) function respawn() if (getElementModel(localplayer) == 71) then x,y,z = getElementPosition(localplayer) rot = getElementRotation(localplayer) setTimer(createPed, 60000, 1, 71, 69, 2503, 17, 180) end end addEventHandler("onClientPedWasted",getRootElement(),respawn)
  16. Come on my server please i will show you.
  17. If a car crashes and it has physical damage would it be possible for it to repair that? And for players to give them health also. And im on my 1.2 server now if u wanna join and i can show u
  18. Thank you, and would it be possible for it to heal physical damage?
  19. I made a new meta and it works now... "dfsdssdsdasd" name="heal gun" version="1.0.0" type="script"/>
  20. "dfsdssdsdasd" name="heal gun" version="1.0.0" type="script"/>
  21. It doesnt take away health, and it doesnt give health either. Thats weird lol
  22. Thanks, in game i type: /crun setDevelopmentMode(true) That works i get true Boolean and then i type /showcol and it shows my collision zones thanks
  23. Ok, ill look at it tomorrow i gotta go to bed now. Thanks and i wanna use create swat rope thing, looks awesome
×
×
  • Create New...