-
Posts
1,248 -
Joined
-
Last visited
Everything posted by WhoAmI
-
Its better to do local x,y = guiGetScreenSize() guiCreateStaticImage( 0, 0, x, y, "login_bg.jpeg", false ) But whatever...
-
And resource guieditor - you can download it from coumminty.mtasa.com.
-
triggerClientEvent, and GUI functions.
-
I think need this https://wiki.multitheftauto.com/wiki/Is ... rBoxActive
-
function changeAlpha () if (alpha >= 255) then alpha = 255 removeEventHandler("onClientRender", root, changeAlpha) end end addEventHandler("onClientRender", root, changeAlpha)
-
addEventHandler("onClientRender", root, function () if (alpha >= 255) then alpha = 255 end end ) I got same problem when I was doing animation on DX's ;p If your animation is done, you can remove this event using removeEventHandler.
-
if (alpha >= 255) then alpha = 255 end And added to render event.
-
Well, thanks, didn't know that there is such a function.
-
function MarkerHit4 ( element ) if (getElementType(element) == "player") then outputChatBox ( "[You win 1034$ !", element, 255, 255, 0 ) givePlayerMoney ( element, 1034 ) elseif (getElementType(element) == "vehicle") then local player = getVehicleOccupant(element) if (player) then outputChatBox ( "[You win 1034$ !", player, 255, 255, 0 ) givePlayerMoney ( player, 1034 ) end end end addEventHandler( "onMarkerHit", am, MarkerHit4 )
-
Your last code is no sense. Look. local lvl = getElementData(localPlayer, "Level") dxDrawImage(x, y, width, height, ":Ranks/rank/rank_"..lvl..".png") If you have 13 lvl, it will draw image rank_13.png.
-
Błąd z systemem PM/PW na ID
WhoAmI replied to aski's topic in Pomoc ze skryptami i programowaniem w Lua
No raczej... Cały gamemode bazuje na MySQL. -
function OnEnter ( thePlayer, seat, jacked ) if ( getElementModel ( source ) == 448 ) then outputChatBox ( "Job started !",player,255,255,0 ) am = createMarker(-2075.11133,900.70227,64.13281 - 1, "cylinder", 3, 0, 102, 51, 153) ab = createBlip (-2075.11133,900.70227,64.13281, 0, 3, 102,51,153 ) end end addEventHandler ( "onVehicleEnter", getRootElement(), OnEnter ) Try this.
-
To center gui use this (x - gui_width)/2 (y - gui_height)/2 Where x and y is screen size.
-
Well yea, but I found in GTASA files exactly same horn as barrack's one, so I'll stay with this solution.
-
Yea, mistake in letters, but no problem.
-
Well I did this. When they key state is "down" sound is on, if "up" off.
-
Well, yea, my bad. zamanayari = guiCreateLabel ( 0.01, 0.22, 0.3, 0.4, "Zaman",true ) function serverzamani() local time = getRealTime() local hours = time.hour local minutes = time.minute guiSetText(zamanayari, string.format("%02d:%02d", hours, minutes) ) end addEventHadnler("onClientRender", root, serverzamani)
-
zamanayari = guiCreateLabel ( 0.01, 0.22, 0.3, 0.4, "Zaman",true ) function serverzamani() local time = getRealTime() local hours = time.hour local minutes = timer.minute guiSetText(zamanayari, string.format("%02d:%02d", hours, minutes) ) end setTimer(serverzamani, 60000, 0)
-
isObjectInACLGroup
-
try to use tonumber and tostring
-
Hi guys. addEventHandler("onResourceStart", resourceRoot, function () local query = dbQuery(handler, "SELECT * FROM pacholki") if (query) then local data, rows = dbPoll(query, -1) if (rows > 0) then for k,v in ipairs(data) do local id = v["id"] local x = v["x"] local y = v["y"] local z = v["z"] outputChatBox(v) local pacholek = createObject(1459, x, y, z) setElementData(pacholek, getResourceName(resource)..":id", id) setElementData(pacholek, getResourceName(resource)..":pacholek", true) end end end end ) Well, I did this, but only creates one of 3 elements. Yea, in database are 3 rows, it spawns only 1. Solutions?