Jump to content

Toffbrown

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by Toffbrown

  1. you really should try to make it yourself, and us help if you have errors but. addEventHandler("onPlayerCommand", root, function(noreg) if noreg == "register" then cancelEvent() end end)
  2. do you wan't to restrict the person from joining Police job unless they are in ACL?
  3. local sx, sy = guiGetScreenSize ( ) local width, height = 600, 500 local point_start = { (sx/2-width/2), -height } local point_end = { (sx/2-width/2), (sy/2-height/2) } addEventHandler ( "onClientRender", root, function ( ) if not startTime then startTime = getTickCount ( ) end if not endTime then endTime = getTickCount ( ) + 3000 end local now = getTickCount() local elapsedTime = now - startTime local duration = endTime - startTime local progress = elapsedTime / duration local setback = guiBringToFront () x1, y1 = unpack ( point_start ) x2, y2 = unpack ( point_end ) local x, y, _ = interpolateBetween ( x1, y1, 0, x2, y2, 0, progress, "OutBounce" ) ---dxDrawRectangle ( x, y, width, height, tocolor ( 0, 0, 0, 45 ) ) dxDrawImage(x, y, width, height, "jjlogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) guiBringToFront(setback) ---dxDrawImage(172, 70, 720, 538, "bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) --dxDrawImage( x, y, width, height, "jjlogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) ----guiCreateStaticImage( 0.0,0.0,1920.0,1080.0, "bg.png", true ) ---dxDrawImage( 0.0, 0.0, width, height, "bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) --function background() --dxDrawImage(0.0, 0.0, 1024, 768, "bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) -- guiBringToFront(background) --end --addEventHandler ( "onClientRender", root, background ) end ) function background() dxDrawImage(309, 142, 414, 325, "bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end addEventHandler ( "onClientRender", root, background )--]] ---[[addEventHandler("onClientResourceStart", resourceRoot, -- function() -- end --)---- --addEventHandler("onClientRender", root, -- function() --dxDrawImage(309, 142, 414, 325, "test.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) -- end --) Very messy sorry about that its kinda my notes
  4. i tried dxDrawImage but lagg still occurs it seems to be just that image because i tried others and it has no FPS issues ever and i am using onClientRender could this cause it?
  5. Just saying no one really plays copied or cloned servers create your own unique idea like DayZ try a game mode like dusk you know the game
  6. i am using an image, as a background for my login GUI and it covers the whole screen but it lags a tonne, i do not know why it lags so much, could it be the sizing or the quality of the image causing this lagging? local x, y, _ = interpolateBetween ( x1, y1, 0, x2, y2, 0, progress, "OutBounce" ) ---dxDrawRectangle ( x, y, width, height, tocolor ( 0, 0, 0, 45 ) ) dxDrawImage( x, y, width, height, "jjlogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) ----guiCreateStaticImage( 0.0,0.0,1920.0,1080.0, "bg.png", true ) ---dxDrawImage( 0.0, 0.0, width, height, "bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) function background() guiCreateStaticImage( x, y, width, height, "bg.png", false ) guiBringToFront(background) end addEventHandler ( "onClientRender", root, background ) end ) Note this is not full script just might i add with the image its kinda like, you know when you are lacking memory and you like drag what ever windows app around and it like lags, like 3d effect is this the image or is it the use of using a dx with gui? i have used DX and plain simple GUI together and no errors
  7. oh i thought he was referring to "Where is the cmd part?" so he was saying he edited it and fixed up the command handlers
  8. sorry, i was tired and at school so rushed it and i was meaning to use setPlayerData
  9. local marker = {} local markerTable = { --x, y, z, r, g, b, dim, x1, y1, z1, rotation, int, dimension {1788.73, -1296.87, 13.41, 255, 255, 0, 0, 1811.22, -1298.09, 22.24, 0, 0, 0}, -- Entrance marker, spawns to 1st floor | First coordinates indicate where the marker is located. Second coordinates indicate where the player will spawn. Do not put the exact spawn coordinates the same as the marker coordinates, otherwise you will get a C Stack Overflow error or it'll just spawn you somewhere else. {1811.17, -1300.80, 22.24, 255, 255, 0, 0, 1791.13, -1292.97, 13.54, 0, 0, 0}, -- 1st floor Down marker, spawns to entrance {1811.17, -1300.80, 27.70, 255, 255, 0, 0, 1811.22, -1298.09, 22.24, 0, 0, 0}, -- 2nd floor Down marker, spawns to 1st floor {1811.17, -1300.80, 33.16, 255, 255, 0, 0, 1811.22, -1298.09, 27.70, 0, 0, 0}, -- 3rd floor Down marker, spawns to 2rd floor {1811.17, -1300.89, 38.62, 255, 255, 0, 0, 1811.22, -1298.09, 33.16, 0, 0, 0}, -- 4th floor Down marker, spawns to 3rd floor {1811.17, -1300.89, 44.09, 255, 255, 0, 0, 1811.22, -1298.09, 38.62, 0, 0, 0}, -- 5th floor Down marker, spawns to 4th floor {1811.17, -1300.89, 49.47, 255, 255, 0, 0, 1811.22, -1298.09, 44.09, 0, 0, 0}, -- 6th floor Down marker, spawns to 5th floor {1811.17, -1300.89, 54.93, 255, 255, 0, 0, 1811.22, -1298.09, 49.47, 0, 0, 0}, -- 7th floor Down marker, spawns to 6th floor {1811.17, -1300.89, 60.40, 255, 255, 0, 0, 1811.22, -1298.09, 54.93, 0, 0, 0}, -- 8th floor Down marker, spawns to 7th floor {1811.17, -1300.89, 65.85, 255, 255, 0, 0, 1811.22, -1298.09, 60.40, 0, 0, 0}, -- 9th floor Down marker, spawns to 8th floor {1811.17, -1300.89, 71.31, 255, 255, 0, 0, 1811.22, -1298.09, 65.85, 0, 0, 0}, -- 10th floor Down marker, spawns to 9th floor {1811.17, -1300.89, 76.70, 255, 255, 0, 0, 1811.22, -1298.09, 71.31, 0, 0, 0}, -- 11th floor Down marker, spawns to 10th floor {1811.17, -1300.89, 82.17, 255, 255, 0, 0, 1811.22, -1298.09, 76.70, 0, 0, 0}, -- 12th floor Down marker, spawns to 11th floor {1811.17, -1300.89, 87.62, 255, 255, 0, 0, 1811.22, -1298.09, 82.17, 0, 0, 0}, -- 13th floor Down marker, spawns to 12th floor {1811.17, -1300.89, 93.09, 255, 255, 0, 0, 1811.22, -1298.09, 87.62, 0, 0, 0}, -- 14th floor Down marker, spawns to 13th floor {1811.17, -1300.89, 98.54, 255, 255, 0, 0, 1811.22, -1298.09, 93.09, 0, 0, 0}, -- 15th floor Down marker, spawns to 14th floor {1811.17, -1300.89, 103.93, 255, 255, 0, 0, 1811.22, -1298.09, 98.54, 0, 0, 0}, -- 16th floor Down marker, spawns to 15th floor {1811.17, -1300.89, 109.40, 255, 255, 0, 0, 1811.22, -1298.09, 103.93, 0, 0, 0}, -- 17th floor Down marker, spawns to 16th floor {1811.17, -1300.89, 114.85, 255, 255, 0, 0, 1811.22, -1298.09, 109.30, 0, 0, 0}, -- 18th floor Down marker, spawns to 17th floor {1811.17, -1300.89, 120.30, 255, 255, 0, 0, 1811.22, -1299.09, 114.85, 0, 0, 0}, -- 19th floor Down marker, spawns to 18th floor {1825.17, -1299.39, 22.24, 255, 255, 0, 0, 1827.09, -1299.36, 27.70, 0, 0, 0}, -- 1st floor Up marker, spawns to 2nd floor {1825.17, -1299.39, 27.70, 255, 255, 0, 0, 1827.09, -1299.36, 33.16, 0, 0, 0}, -- 2nd floor Up marker, spawns to 3rd floor {1825.17, -1299.39, 33.16, 255, 255, 0, 0, 1827.09, -1299.36, 38.62, 0, 0, 0}, -- 3rd floor Up marker, spawns to 4th floor {1825.17, -1299.39, 38.62, 255, 255, 0, 0, 1827.09, -1299.36, 44.07, 0, 0, 0}, -- 4th floor Up marker, spawns to 5th floor {1825.17, -1299.39, 44.09, 255, 255, 0, 0, 1827.09, -1299.36, 49.47, 0, 0, 0}, -- 5th floor Up marker, spawns to 6th floor {1825.17, -1299.39, 49.47, 255, 255, 0, 0, 1827.09, -1299.36, 54.93, 0, 0, 0}, -- 6th floor Up marker, spawns to 7th floor {1825.17, -1299.39, 54.93, 255, 255, 0, 0, 1827.09, -1299.36, 60.40, 0, 0, 0}, -- 7th floor Up marker, spawns to 8th floor {1825.17, -1299.39, 60.40, 255, 255, 0, 0, 1827.09, -1299.36, 65.85, 0, 0, 0}, -- 8th floor Up marker, spawns to 9th floor {1825.17, -1299.39, 65.85, 255, 255, 0, 0, 1827.09, -1299.36, 71.31, 0, 0, 0}, -- 9th floor Up marker, spawns to 10th floor {1825.17, -1299.39, 71.31, 255, 255, 0, 0, 1827.09, -1299.36, 76.70, 0, 0, 0}, -- 10th floor Up marker, spawns to 11th floor {1825.17, -1299.39, 76.70, 255, 255, 0, 0, 1827.09, -1299.36, 82.17, 0, 0, 0}, -- 11th floor Up marker, spawns to 12th floor {1825.17, -1299.39, 82.17, 255, 255, 0, 0, 1827.09, -1299.36, 87.62, 0, 0, 0}, -- 12th floor Up marker, spawns to 13th floor {1825.17, -1299.39, 87.62, 255, 255, 0, 0, 1827.09, -1299.36, 93.09, 0, 0, 0}, -- 13th floor Up marker, spawns to 14th floor {1825.17, -1299.39, 93.09, 255, 255, 0, 0, 1827.09, -1299.36, 98.54, 0, 0, 0}, -- 14th floor Up marker, spawns to 15th floor {1825.17, -1299.39, 98.54, 255, 255, 0, 0, 1827.09, -1299.36, 103.93, 0, 0, 0}, -- 15th floor Up marker, spawns to 16th floor {1825.17, -1299.39, 103.93, 255, 255, 0, 0, 1827.09, -1299.36, 109.40, 0, 0, 0}, -- 16th floor Up marker, spawns to 17th floor {1825.17, -1299.39, 109.30, 255, 255, 0, 0, 1827.09, -1299.36, 114.85, 0, 0, 0}, -- 17th floor Up marker, spawns to 18th floor {1825.17, -1299.39, 114.85, 255, 255, 0, 0, 1827.09, -1299.36, 120.30, 0, 0, 0}, -- 18th floor Up marker, spawns to 19th floor --[[ {1825.17, -1299.39, 120.30, 255, 255, 0, 0, 1827.09, -1299.36, } -- 19th floor Up marker, spawns to top of building --]] } function teleporter(hitElement, spawn) local markerIndex = getElementData(source, "markerIndex") local plrSkin = getElementModel(hitElement) local rotation = markerTable[markerIndex][11] local int = markerTable[markerIndex][12] local dim = markerTable[markerIndex][13] if (not getPedOccupiedVehicle(hitElement)) then if (dim) then setElementPosition (hitElement, markerTable[markerIndex][8], markerTable[markerIndex][9], markerTable[markerIndex][10])------ edited this else setElementPosition (hitElement, markerTable[markerIndex][8], markerTable[markerIndex][9], markerTable[markerIndex][10])------ this aswell end end end for i=1, #markerTable do local x, y, z, r, g, b, dim = markerTable[i][1], markerTable[i][2], markerTable[i][3], markerTable[i][4], markerTable[i][5], markerTable[i][6], markerTable[i][7] marker[i] = createMarker(x, y, z + 1, "arrow", 2, r, g, b, 200) setElementDimension(marker[i], dim) setElementData(marker[i], "markerIndex", i) addEventHandler("onMarkerHit", marker[i], teleporter) end when the player has to 'Spawn' it has to re spawn bassically in small terms so setElementPosition sets the element in you x,y,z co-ords instead of respawning Cheers Arnold-1 was on the right track and same mind set as me
  10. function() local x,y,z = getElementPosition (source) local sf = getDistanceBetweenPoints3D (x,y,z,-2655.1,639.46,14.454) local lv = getDistanceBetweenPoints3D (x,y,z,1607.2,1816.2,10.8) local ls = getDistanceBetweenPoints3D (x,y,z,2035.99,-1403.7,17.2) addEventHandler ("onPlayerWasted",getRootElement(),
  11. takePlayerMoney( theTriggerer, 500 ) should work
  12. its because of the server Syncing with the client and this causes basically a stream sluggishness so there is always going to be a lag with it, but you could have a setTimer variable with your script? we can't help if you haven't posted the code
  13. if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then guiSetEnabled ( guiElement, true ) elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Everyone" ) ) then guiSetEnabled ( guiElement, false ) cancelEvent(true) end end this is what you need, for the guiElement you enter in what the element your GUI uses
  14. if you need further just Direct message me
  15. thought i might add @xXMADEXx i have tried Remi-X's Modloader before but the rim's never worked for me, but is perfect for vehicle mods
  16. 1)Try updating your MTA should be 1.3.5 2)have you tried re-installing the server? including MTA? 3)if you don't want to do that re-download MTA and create a new installation directory only installing server files then add your own files
  17. function rim() txd = engineLoadTXD("locationofthe.txd", id ) engineImportTXD(txd, id) dff = engineLoadDFF("locationofthe.dff", id ) engineReplaceModel(dff, id) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), rim) so for the engineLoadTXD it "loading" the TXD file then engineImportTXD "inserts" it into the server so then you can see it. the id is the ID of the rim you wan't to replace The ID's range from 1083-1097 (extracted this from admin resource)
  18. Simply delete the resource and the game mode for freeroam is "Play" and just use your new game mode you will create
  19. sorry that's what i thought you meant
  20. i used it the other day and had no error's
  21. if you remove the resource "freeroam" from mta server config file it won't run when server is started, and is F1 your own resource or are you talking about the freeroam GUI being bounded to F1?
×
×
  • Create New...