Jump to content

Markeloff

Members
  • Posts

    230
  • Joined

  • Last visited

Everything posted by Markeloff

  1. for index , data in ipairs ( table ) do local MarkerX, MarkerY, MarkerZ, Weapon, {skins} local theSkin = --random {skins} local thePed = createPed ( theSkin, x, y, z ) end I want the random of the skins table. How?
  2. I can't see the map. This is what I could see on that site.
  3. Server's Memory or client's computer?
  4. Oh Thanks !! Finally not a complicated idea.
  5. The problem is that I'm using a table. local theSpawnTable = { { "Civilian", "SF" }, { "Army", "Desert" }, { "Medic", "SF" }, } and from the table I created the dxDrawText, I'm making a spawn panel with arrows. When I press an arrow it shows the next window but it's the same one with different dx text. I couldn't find any way to check the the team if Civilian then Spawn Window will be from i=2,#theSpawnTable . function SpawnWindow() for i=1,#theSpawnTable do --I won't make it for one i=1, for all i=2 or i=3 local team = theSpawnTable[i][1] dxDrawText("Team : "..team, 648, 270, 779, 304, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) end end
  6. how to define it as a variable?
  7. Hello, Does anyone know how to get the text inside the DxDrawText? Well, let me clarify : dxDrawText("Team : ",....) if the text is "Team : " then ... Thanks.
  8. Well, I trust w3schools.com. I learnt from there too. They can give you useful lessons. http://w3schools.com/sql/default.asp https://community.multitheftauto.com/in ... ls&id=5142 See this maybe It could help you.
  9. Markeloff

    GUI Help

    function closeAdminPanel() guiSetVisible(adminPanel,false) showCursor(false) addEventHandler("onClientGUIClick",adminPanelButton,closeAdminPanel) Read Carefully https://wiki.multitheftauto.com/wiki/GetRootElement
  10. Well, he can play the song from an url if he found an online converter + player. Otherwise, after converting he should download the music somehow than play it.
  11. You want the music of the video? Well, if you tell us what are you trying to do we can help you.
  12. Use an Online Converter. callRemote,fetchRemote
  13. Does anyone know how to change xyz of the haystack? server side --Modified by Ransom players = getElementsByType ( "player" ) scoreboardRes = getResourceFromName("scoreboard") addEventHandler("onResourceStop",getResourceRootElement(getThisResource()), function() call(scoreboardRes,"removeScoreboardColumn","Current level") call(scoreboardRes,"removeScoreboardColumn","Max level") call(scoreboardRes,"removeScoreboardColumn","Health") end ) function spawnFunct ( passedPlayer ) if (not isElement(passedPlayer)) then return false end r = 20 angle = math.random(133, 308) --random angle between 0 and 359.99 centerX = -12 centerY = -10 spawnX = r*math.cos(angle) + centerX --circle trig math spawnY = r*math.sin(angle) + centerY --circle trig math spawnAngle = 360 - math.deg( math.atan2 ( (centerX - spawnX), (centerY - spawnY) ) ) spawnPlayer ( passedPlayer, spawnX, spawnY, 3.3, spawnAngle ) end for k,v in ipairs(players) do --Game start spawn spawnFunct ( v ) end function playerJoin ( ) fadeCamera ( source, true ) spawnFunct ( source ) end addEventHandler ( "onPlayerJoin", root, playerJoin ) function playerWasted ( ) setTimer ( spawnFunct, 3000, 1, source ) end addEventHandler ( "onPlayerWasted", root, playerWasted ) -- To do: -- * Dynamic circle spawn -- Options: local options = { x = 4, y = 4, --z = 49, -- +1 z = get("levels") - 1, -- +1 --b = 245, b = get("blocks"), r = 4 } -- Don't touch below! local matrix = {} local objects = {} local moving = {} local xy_speed local z_speed local barrier_x local barrier_y local barrier_r function move () --outputDebugString("move entered") local rand repeat rand = math.random( 1, options.b ) until (moving[rand] ~= 1) local object = objects[ rand ] local move = math.random( 0, 5 ) --outputDebugString("move: " .. move) local x,y,z local x2,y2,z2 = getElementPosition ( object ) --Purge old player positions for x = 1,options.x do for y = 1,options.y do for z = 1,options.z do if (matrix[x][y][z] == 2) then matrix[x][y][z] = 0 end end end end --Fill in new player positions local players = getElementsByType( "player" ) for k,v in ipairs(players) do x,y,z = getElementPosition( v ) x = math.floor(x / -4 + 0.5) y = math.floor(y / -4 + 0.5) z = math.floor(z / 3 + 0.5) if (x >= 1) and (x <= options.x) and (y >= 1) and (y <= options.y) and (z >= 1) and (z <= options.z) and (matrix[x][y][z] == 0) then matrix[x][y][z] = 2 end end x = x2 / -4 y = y2 / -4 z = z2 / 3 if (move == 0) and (x ~= 1) and (matrix[x-1][y][z] == 0) then moving[rand] = 1 local s = 4000 - xy_speed * z setTimer (done, s, 1, rand, x, y, z) x = x - 1 matrix[x][y][z] = 1 --outputDebugString("moving obj") moveObject ( object, s, x2 + 4, y2, z2, 0, 0, 0 ) elseif (move == 1) and (x ~= options.x) and (matrix[x+1][y][z] == 0) then moving[rand] = 1 local s = 4000 - xy_speed * z setTimer (done, s, 1, rand, x, y, z) x = x + 1 matrix[x][y][z] = 1 --outputDebugString("moving obj") moveObject ( object, s, x2 - 4, y2, z2, 0, 0, 0 ) elseif (move == 2) and (y ~= 1) and (matrix[x][y-1][z] == 0) then moving[rand] = 1 local s = 4000 - xy_speed * z setTimer (done, s, 1, rand, x, y, z) y = y - 1 matrix[x][y][z] = 1 --outputDebugString("moving obj") moveObject ( object, s, x2, y2 + 4, z2, 0, 0, 0 ) elseif (move == 3) and (y ~= options.y) and (matrix[x][y+1][z] == 0) then moving[rand] = 1 local s = 4000 - xy_speed * z setTimer (done, s, 1, rand, x, y, z) y = y + 1 matrix[x][y][z] = 1 --outputDebugString("moving obj") moveObject ( object, s, x2, y2 - 4, z2, 0, 0, 0 ) elseif (move == 4) and (z ~= 1) and (matrix[x][y][z-1] == 0) then moving[rand] = 1 local s = 3000 - z_speed * z setTimer (done, s, 1, rand, x, y, z) z = z - 1 matrix[x][y][z] = 1 --outputDebugString("moving obj") moveObject ( object, s, x2, y2, z2 - 3, 0, 0, 0 ) elseif (move == 5) and (z ~= options.z) and ((matrix[x][y][z+1] == 0) or ((z ~= options.z-1) and (matrix[x][y][z+1] == 2) and (matrix[x][y][z+2] ~= 1))) then moving[rand] = 1 local s = 3000 - z_speed * z setTimer (done, s, 1, rand, x, y, z) z = z + 1 matrix[x][y][z] = 1 --outputDebugString("moving obj") moveObject ( object, s, x2, y2, z2 + 3, 0, 0, 0 ) end -- setTimer ("move", 100 ) end function onThisResourceStart ( ) call(scoreboardRes,"addScoreboardColumn","Current level") call(scoreboardRes,"addScoreboardColumn","Max level") call(scoreboardRes,"addScoreboardColumn","Health") --outputChatBox("* Haystack-em-up v1.44 by Aeron", root, 255, 100, 100) --PFF meta is good enough --Calculate speed velocity xy_speed = 2000 / (options.z + 1) z_speed = 1500 / (options.z + 1) --Clean matrix for x = 1,options.x do matrix[x] = {} for y = 1,options.y do matrix[x][y] = {} for z = 1,options.z do matrix[x][y][z] = 0 end end end --Place number of haybails in matrix local x,y,z for count = 1,options.b do repeat x = math.random ( 1, options.x ) y = math.random ( 1, options.y ) z = math.random ( 1, options.z ) until (matrix[x][y][z] == 0) matrix[x][y][z] = 1 objects[count] = createObject ( 3374, x * -4, y * -4, z * 3 ) --, math.random ( 0, 3 ) * 90, math.random ( 0, 1 ) * 180 , math.random ( 0, 1 ) * 180 ) end --Place number of rocks in matrix for count = 1,options.r do repeat x = math.random ( 1, options.x ) y = math.random ( 1, options.y ) z = math.random ( 1, options.z ) until (matrix[x][y][z] == 0) matrix[x][y][z] = 1 createObject ( 1305, x * -4, y * -4, z * 3, math.random ( 0, 359 ), math.random ( 0, 359 ), math.random ( 0, 359 ) ) end --Calculate tower center and barrier radius barrier_x = (options.x + 1) * -2 barrier_y = (options.y + 1) * -2 if (options.x > options.y) then barrier_r = options.x / 2 + 20 else barrier_r = options.y / 2 + 20 end --Place top-haybail + minigun createObject ( 3374, barrier_x, barrier_y, options.z * 3 + 3 ) thePickup = createPickup ( barrier_x, barrier_y, options.z * 3 + 6, 3, 2880, 1 ) setTimer ( move, 100, 0 ) setTimer ( barrier, 1000, 1) fadeCamera ( getRootElement(), true ) end function barrier () local barrier = createColCircle ( barrier_x, barrier_y, barrier_r ) addEventHandler ( "onColShapeLeave", barrier, function ( p ) if ( getElementType ( p ) == "player" ) then killPed ( p ) outputChatBox( "* Killed: Don't walk away.", p, 255, 100, 100 ) end end ) end function onPickupHit ( player ) if source == thePickup then outputChatBox( "* " .. getPlayerName ( player ) .. " made it to the top!", root, 255, 100, 100, false ) toggleControl ( player, "fire", true ) destroyElement( source ) end end function done ( id, x, y, z ) moving[id] = 0 matrix[x][y][z] = 0 end --addEventHandler( "onResourceStart", root, function() onMapLoad() end) --addEventHandler( "onPickupHit", root, function() onPickupHit() end) --addEventHandler( "onPlayerJoin", root, function() onPlayerJoin() end) addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), onThisResourceStart) addEventHandler( "onPickupHit", root, onPickupHit)
  14. High school? hhh. Can you provide us with some screenshots, because it will encourage people to buy from you, as you want..
  15. Hello, I would like to change the hud.txd with a new one. Howto? txd = engineLoadTXD ( "p/p.txd" ) engineImportTXD ( txd, ID )--- What shall I write here to replace the hud.txd?
  16. Can someone explain for me what's the difference between getAccountPlayer ( account theAccount ) and getAccountName ( account theAccount ) .
  17. https://wiki.multitheftauto.com/wiki/Slothman/Slothbot
  18. Hello there, I need help here about, Steps to (create the database get data, update data, delete data, insert data (functions)). gudboi.
  19. If he didn't ? What's the problem? For example, the case of community resources, he may downloaded them and didn't know how to open ports. I faced the problem once, so being able to script has no relation to have knowledge to open such a port.
  20. Hello everyone, I wanna ask you about the superman resource in the community site. "I was flying and suddenly when I went on ground I was bugged, even under ground.". This happened for me many times, does the resource have a new update that I'vent seen or it's the same case for you?. This bug gets on my nerves! Help!
×
×
  • Create New...