Jump to content

yesyesok

Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by yesyesok

  1. yesyesok

    asefetcher

    ya ya keep dreaming.
  2. Why are you bumping an old topic and posting your problem?
  3. yesyesok

    YouTube

    Are you sure you started the mta 1.5 client AND the mta 1.5 server? Also, it's a client script. ya I'm sure, It loaded the gui window but not YouTube.
  4. yesyesok

    YouTube

    I downloaded the nighty 1.5 and this example isn't working in MTA 1.5
  5. yesyesok

    YouTube

    I saw a video of MTA in which a player was using YouTube in-game Does anyone knows what functions should i use to create the?
  6. Nice but I'm Not able to see the map when i'm in editor. What should i do?????
  7. yesyesok

    help

    Hey, i created a gui panel with gui editor, But it shows the panel when i start the resource GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUI.window[1] = guiCreateWindow(222, 217, 378, 192, "testinggui", false) guiWindowSetSizable(GUI.window[1], false) guiSetProperty(GUI.window[1], "CaptionColour", "FFFA1818") GUIEditor.button[1] = guiCreateButton(57, 88, 109, 57, "guitest", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(224, 93, 126, 52, "test", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(87, 4, 206, 15, "", false, GUIEditor.window[1]) end ) I don't want the resource to start 1st.
  8. yesyesok

    mini-games

    Thanks One more question Is cef possible in mta and one question can i add json games in mta?
  9. yesyesok

    mini-games

    That's an example .lua game, how do i make them work in Mta ????
  10. yesyesok

    mini-games

    How do i make .lua mini-games work in mta?? Example snake.lua local xMax = math.floor( 128 / 6 ) - 1 local yMax = math.floor( 96 / 8 ) - 1 local game_map = {} local Head = {} local Tail = {} local highscore = 0 local size = 3 Tail.x = 1 Tail.y = 1 Head.x = Tail.x + ( size - 1 ) Head.y = Tail.y local Food = {} Food.x = false Food.y = false Head.dx = 1 Head.dy = 0 Tail.dx = Head.dx Tail.dy = Head.dy local direction = "right" local level = 1 local score = 0 lm3s.disp.init( 1000000 ) local kit = require( pd.board() ) local pressed = {} local function create_food() -- if not food then Food.x, Food.y = math.random( xMax - 1), math.random( yMax - 1) while game_map[ Food.x ][ Food.y ] do Food.x, Food.y = math.random( xMax - 1 ), math.random( yMax - 1 ) end game_map[ Food.x ][ Food.y ] = "food" lm3s.disp.print( "@", Food.x * 6, Food.y * 8, 10 ) -- end end local function eat_food() lm3s.disp.print( "@", Head.x * 6, Head.y * 8, 0 ) game_map[ Head.x ][ Head.y ] = nil create_food() score = score + level end local function check_collision() if Head.x <= 0 or Head.x >= xMax then return true elseif Head.y <= 0 or Head.y >= yMax then return true elseif ( ( game_map[ Head.x ][ Head.y ] ) and ( game_map[ Head.x ][ Head.y ] ~= "food" ) ) then return true end return false end local function move() if game_map[ Tail.x ][ Tail.y ] == "right" then Tail.dx = 1 Tail.dy = 0 elseif game_map[ Tail.x ][ Tail.y ] == "left" then Tail.dx = -1 Tail.dy = 0 elseif game_map[ Tail.x ][ Tail.y ] == "up" then Tail.dx = 0 Tail.dy = -1 elseif game_map[ Tail.x ][ Tail.y ] == "down" then Tail.dx = 0 Tail.dy = 1 end game_map[ Head.x ][ Head.y ] = direction Head.x = Head.x + Head.dx Head.y = Head.y + Head.dy if game_map[ Head.x ][ Head.y ] == "food" then eat_food() else lm3s.disp.print( "*", Tail.x * 6, Tail.y * 8, 0 ) game_map[ Tail.x ][ Tail.y ] = nil Tail.x = Tail.x + Tail.dx Tail.y = Tail.y + Tail.dy end lm3s.disp.print( "*", Head.x * 6, Head.y * 8, 10 ) end local function draw_walls() for i = 0, xMax*2, 1 do lm3s.disp.print( "_", i * 3, yMax * 8 - 6, 11 ) lm3s.disp.print( "_", i * 3, 0, 11 ) end for i = 0, yMax*2, 1 do lm3s.disp.print( "|", xMax * 6, i * 4, 11 ) lm3s.disp.print( "|", 0, i * 4, 11 ) end end local function button_clicked( button ) if kit.btn_pressed( button ) then pressed[ button ] = true else if pressed[ button ] then pressed[ button ] = nil return true end end return false end function init() food = false lm3s.disp.clear() draw_walls() size = 3 score = 0 level = 1 Tail.x = 1 Tail.y = 1 Head.x = Tail.x + ( size - 1 ) Head.y = Tail.y Head.dx = 1 Head.dy = 0 Tail.dx = Head.dx Tail.dy = Head.dy direction = "right" for i = 0, xMax, 1 do game_map[ i ] = {} end for i = 0, size - 1, 1 do game_map[ Tail.x + ( i * Tail.dx ) ][ Tail.y + ( i * Tail.dy ) ] = direction lm3s.disp.print( "*", ( Tail.x + ( i * Tail.dx ) ) * 6, ( Tail.y + ( i * Tail.dy ) ) * 8, 10 ) end create_food() end --init() --create_food() repeat init() while true do local dir = direction for i = 1, 1000 - ( 100 * level ), 1 do if kit.btn_pressed( kit.BTN_RIGHT ) and direction ~= "left" then dir = "right" Head.dx = 1 Head.dy = 0 end if kit.btn_pressed( kit.BTN_LEFT ) and direction ~= "right" then dir = "left" Head.dx = -1 Head.dy = 0 end if kit.btn_pressed( kit.BTN_UP ) and direction ~= "down" then dir = "up" Head.dx = 0 Head.dy = -1 end if kit.btn_pressed( kit.BTN_DOWN ) and direction ~= "up" then dir = "down" Head.dx = 0 Head.dy = 1 end if button_clicked( kit.BTN_SELECT ) and level < 10 then level = level + 1 end end direction = dir move() if check_collision() then break end collectgarbage( "collect" ) end if score > highscore then highscore = score end lm3s.disp.clear() -- This statements displays the game over screen lm3s.disp.print( "Game Over :(", 30, 20, 11 ) lm3s.disp.print( "Your score was "..tostring( score ), 0, 40, 11 ) lm3s.disp.print( "Highscore: "..tostring( highscore ), 15, 50, 11 ) lm3s.disp.print( "SELECT to restart", 6, 70, 11 ) enough = true -- If the player presses select before the time reach 1000000ms, then restart the game for i=1, 1000000 do if kit.btn_pressed( kit.BTN_SELECT ) then enough = false break end end lm3s.disp.clear() until ( enough ) lm3s.disp.off() Hide details Change log r133 by teo.benjamin on Mar 31, 2010 Diff MESSAGE=Dado vai me matar. Go to: Older revisions r132 by teo.benjamin on Mar 31, 2010 Diff r131 by teo.benjamin on Mar 31, 2010 Diff r130 by teo.benjamin on Mar 31, 2010 Diff All revisions of this file File info Size: 4934 bytes, 211 lines View raw file File properties svn:eol-style native
  11. yesyesok

    need help

    I know create col shape what i did is i created and train with create vehicle and then i attached the col shape to it is there any possible way where i can attach the col shape to every train like i don't want to write createvehicle everytime.
  12. Hex only contains 6 characters.
  13. yesyesok

    need help

    Can you explain how can i do this ? with example if possible Sorry i'm new to lua.
  14. yesyesok

    need help

    It's kill ped with other vehicle but not with train
  15. yesyesok

    need help

    please help, I want it like when a player touch the infernus he should die, when infernus is not even moving.
  16. yesyesok

    need help

    how to make it work?
  17. yesyesok

    need help

    ahhh there is no debug but still it doesn't kill, i want it like when i touch the vehicle it should kill me.
  18. yesyesok

    need help

    debug : bad argument @ 'getelemnenttype' expected at argument 1 got nil
×
×
  • Create New...