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 you've created the whole system and now making the websites you can't because there is a limit of height in GUI's. ;S
/via iPhone
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.
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)
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...
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.
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.
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.
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?
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
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?