-
Posts
1,646 -
Joined
-
Last visited
Everything posted by CapY
-
You remove a command handler in the snow resource and you bind key. https://wiki.multitheftauto.com/wiki/BindKey
-
That's touchy story mate. Happy Christmas & New year you too.
-
Btw, "Raketa" means Rocket
-
Fuck yeah, finally MTA came to a deserved place.
-
Merry Christmas to everyone from Croatia !
-
Ignore post above. My question is : Why are you using guiSetSize(image, labelWidth, labelHeight) guiSetSize(image, labelWidth, labelHeight) two times ? EDIT : Nvm, getting it fixed. EDIT2: I improved your code, now it works like a charm, thanks.
-
gui[6] = {} gui[6]["image"] = guiCreateStaticImage ( sw/2 - 240.5, top/2 ,windowWidth, windowHeight, "images/tutorial.png", false ) gui[6]["label"] = guiCreateLabel ( 8,3,460,88,"",false, gui[6]["image"] ) function setImageSizeLabel(image, label) if not isElement(image) or not isElement(label) then return false end local labelExtent, fontHeight = guiLabelGetTextExtent(label), guiLabelGetFontHeight(label) local labelWidth, labelHeight = guiGetSize(label) if labelExtent > labelWidth then labelWidth = labelExtent end if fontHeight > labelHeight then labelHeight = fontHeight end guiSetSize(image, labelWidth, labelHeight) guiSetSize(image, labelWidth, labelHeight) guiLabelSetHorizontalAlign(label, "center") guiLabelSetVericalAlign(label, "center") end addEventHandler ( "onClientPlayerImageResize", player, function ( ) for k, v in ipairs (gui) do guiSetSize( v["image"], labelWidth, labelHeight) end end ) addEventHandler("onClientGuide", player, function () guiSetVisible ( gui[6]["image"], true ) if (Animation.createAndPlay ( gui[6]["image"], Animation.presets.guiFadeIn ( 750 ) ) ) then guiSetText ( gui[6]["label"], getTextFromID ( "text:general-intro" ).."\n "..name ) setImageSizeLabel(gui[6], gui[6]) setTimer ( guiSetVisible, 750, 1, gui[6]["image"], true ) setTimer( move, 5000, 1) triggerEvent ( "onClientPlayerImageResize", player ) showCursor ( false ) end end ) Look's like a mess right now, still cannot get it working. ...and i have a feeling i'm not using it right.
-
I have been breaking my head on this custom function. The image doesn't fills desired text lenght properly, why is that ? function setImageSizeLabel(image, label) if not isElement(image) or not isElement(label) then return end local w,h = guiLabelGetTextExtent(label)+2,guiLabelGetFontHeight(label)+2 guiSetSize(image, w, h, false) guiSetSize(label, w, h, false) guiLabelSetHorizontalAlign(label, "center") guiLabelSetVericalAlign(label, "center") end
-
Because you didn't created a meta.xml in your script directory. Why just not take a look on this : https://wiki.multitheftauto.com/wiki/Server_Manual and this, if you want to : https://wiki.multitheftauto.com/wiki/Meta.xml
-
1)You put that codes in your "resources" folder. 2)Downloading client scripts is automatic, depends on which handler you assign on them.
-
Function "getPlayerACLGroup" won't work. And you don't need "setPlayerAdmin" in event handler : addEventHandler ( "onPlayerJoin", root, setPlayerAdmin , getPlayerACLGroup ) You can separate them: addEventHandler ( "onPlayerJoin", root , getPlayerACLGroup ) addEventHandler ( "onPlayerJoin", root , setPlayerAdmin )
-
--Create the Window called : "My Window" local Wnd = guiCreateWindow ( 500, 500, 500, 500, "My Window", false ) function onResourceStart () local Window = guiGetVisible ( Wnd ) --We predefine a variable for Window if (Window) == true then -- If window is shown guiSetVisible ( Wnd, false ) --We hide it showCursor ( false ) --We hide it's cursor else --else we.. guiSetVisible ( Wnd, true ) --Show the window showCursor ( true ) --We show it's cursor end end addEventHandler("onClientResourceStart", root , onResourceStart) --We handle the function, when download ends. bindKey ( "f1", "down", onResourceStart ) --And we bind it with 'f1' key
-
function onresourceStart () bindKey ("F7", "down", showUserPanel) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function showUserPanel () getVisible = guiGetVisible (userPanelWindow) if (getVisible == true) then guiSetVisible (userPanelWindow, false) showCursor (false) else guiSetVisible (userPanelWindow, true) showCursor (true) local serial = getPlayerSerial(getLocalPlayer()) local wins = getElementData(getLocalPlayer(), "RaceWins") local loses = getElementData(getLocalPlayer(), "RaceLoses") local playerName = getPlayerName(getLocalPlayer()) if loses and wins then guiSetText ( label1, "Name: " .. playerName .. " " ) guiSetText ( label2, "Total Wins:" .. wins .. " " ) guiSetText ( label3, "Total Loses: " .. loses .. " " ) guiSetText ( label4, "Serial : " .. serial .. " " ) else guiSetText ( label2, "Total Wins: 0 " ) guiSetText ( label3, "Total Loses: 0 " ) end end end 'end' replaced with 'else'
-
7 ) Modify play resource for spawn, and for skin, use account data. 8 ) Use onPlayerCommand and cancel "kill" string event.
-
A: I'm not answering to two questions. Q: Is that okay ?
-
getAccountData setAccountData
-
A:PEANUT Q: Jelly ?
-
/stop forum_system /stop runcode P.S. Your signature is outdated.
-
Haha Benx you're geek. lol
-
How so low ? When i'm doing a video with fraps, 10 seconds is already 100 mb's for me.
-
At line 19, in "server.lua", you didn't set the function name.
-
I saw, lol. How much your video takes space ?