Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. Its better to do local x,y = guiGetScreenSize() guiCreateStaticImage( 0, 0, x, y, "login_bg.jpeg", false ) But whatever...
  2. And resource guieditor - you can download it from coumminty.mtasa.com.
  3. triggerClientEvent, and GUI functions.
  4. I think need this https://wiki.multitheftauto.com/wiki/Is ... rBoxActive
  5. WhoAmI

    Alpha Problem

    function changeAlpha () if (alpha >= 255) then alpha = 255 removeEventHandler("onClientRender", root, changeAlpha) end end addEventHandler("onClientRender", root, changeAlpha)
  6. WhoAmI

    Alpha Problem

    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.
  7. WhoAmI

    Alpha Problem

    if (alpha >= 255) then alpha = 255 end And added to render event.
  8. Well, thanks, didn't know that there is such a function.
  9. 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 )
  10. WhoAmI

    dxDraw

    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.
  11. 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.
  12. To center gui use this (x - gui_width)/2 (y - gui_height)/2 Where x and y is screen size.
  13. Well yea, but I found in GTASA files exactly same horn as barrack's one, so I'll stay with this solution.
  14. Yea, mistake in letters, but no problem.
  15. Well I did this. When they key state is "down" sound is on, if "up" off.
  16. 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)
  17. 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)
  18. try to use tonumber and tostring
  19. WhoAmI

    dbPoll

    Oh, I don't know how It was done, but It repaired by itself. Oo
  20. WhoAmI

    dbPoll

    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?
×
×
  • Create New...