Jump to content

MOHAKO

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MOHAKO

  • Rank
    Square
  • Birthday 15/06/1996

Details

  • Gang
    Latvian MTA
  • Location
    Latvia, Ventspils
  • Occupation
    Designer, Front-end developer, Programmer
  • Interests
    PHP, HTML, CSS, JavaScript, LUA, Squirrel, Pawn

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. MOHAKO

    setGuiSize()

    So, what you suggest to do? I've a created a script like in-game computer system where is a website system, etc. The websites are based on GUI. There a GUI window which has a static size (no matter what's the size of clients display) and the content of the website is created with GUI static images, labels, etc… inside the GUI scroll pane, bet whenever the page reaches height 900 (because the height of my display is 900px) content after 900 is hidden. What'd any of you suggest to use or is there a way, how to create a infinity scrolling inside the GUI. It's now like a pain in the ass, when y
  2. MOHAKO

    setGuiSize()

    Does anyone know, is it possible to set gui size bigger than the client's resolution? E.g. Client resolution: 1600x900 but the size of GUI must be 700x1300? I'm talking about the content which is scrollable by gui scroll pane... Cheers up.
  3. oldstat = ? Ups... At the first I wrote "oldstat" and "newstat", but then rewrote them to "old" and "new". Sorry my fault, it's supposed to be "old" (oldstat -> old). addEventHandler ( "onZombieWasted", root, function ( _, killer ) if ( killer and getElementType ( killer ) == "player" ) then local current = getPedStat ( killer, 75 ) setPedStat ( killer, 75, ( current + 100 ) ) end end ) addEvent ("onZombieWasted", true)
  4. function equi() setPedStat(source, 75, 500) end addEventHandler("onPlayerJoin", root, equi) function playerDeath(ammo, killer) if (killer) then if (getElementType(killer) == "player") then local old = getPedStat(killer, 75) local new = oldstat + 100 setPedStat(killer, 75, new) end end end addEventHandler("onPlayerWasted", root, playerDeath) Try this...
  5. Make sure you got a logical thinking and you're patent. It's the way how I found a programmer in me. When you're sure, that you got a logical thinking, start to read manuals and experiment with tutorials, but try to write code your own, not copy-paste, it won't make you learn scripting, it'll lead you into copycat and that's bad.
  6. function equi() setPedStat(source, 75, 500) end addEventHandler("onPlayerJoin", root, equi) addEventHandler ( "onPlayerWasted", root, function ( _, source ) if ( source ) then local current = getPedStat ( source, 75 ) local new = current + 100 setPedStat ( source, 75, new ) else return end end ) try this.
  7. It doesn't work like this? function equi() setPedStat(source, 75, 500) end addEventHandler("onPlayerJoin", root, equi)
  8. MOHAKO

    Players online

    Use http://wiki.multitheftauto.com/wiki/PHP_SDK and some PHP knowledge or you can use some game monitoring service (e.g. Game-State).
  9. Hello, MTA is not supporting SAMP objects. You've to export SAMP's object and then import them into MTA by replacing current MTA objects. If you don't have any previous MTA scripting experience, you won't be able to create system like that. It's shitloud of code.
  10. Thank you so much myonlake. It worked but with some improvements. Thank you again, you've earned a cookie from me.
  11. Well, the point is - in the first function, it'll select the characters from the database and print them in the character selection screen. The second function, which renders the 'dxDrawRectangle', will be used as background for one character... If account has two characters, it'll draw another 'dxDrawRectangle', but in the second 'dxDrawRectangle', the Y coordinates will be changed by +66 pixels, You got me?
  12. Yeah... But when it's used in "onClientRender", the result being printed infinity times... e.g screenY, count = nil function one_bla() -- some code screenY = 20 -- another code gets the count of something count = 5 -- sets the count from something addEventHandler("onClientRender", getRootElement(), drawBg) end function drawBg() for i = 1, count do dxDrawRectangle(0, screenY, 256, 64, tocolor(0,0,0,100), false) screenY = screenY + 66 end end
  13. Hello guys. Amm, I'm here for a really stupid question, but... here it is - I want to create 'something' which will be shown multiple times, multiple times depending on some count (see example below). e.g. if the count will be 5, it will print 'dxDrawRectangle' 5 times. Anyone can help me out?
×
×
  • Create New...