Jump to content

King12

Members
  • Posts

    432
  • Joined

  • Last visited

Everything posted by King12

  1. King12

    setMoonSize(0)

    Actually they weren't showing before the update (even with a default timecyc.dat), but now they do. There has to be an option to enable/disable them.
  2. King12

    setMoonSize(0)

    I don't know about the thread poster, but I tried installing a fresh GTA:SA and they still appear.
  3. King12

    setMoonSize(0)

    This happened after recent updates. I see some stars, and the moon too.
  4. King12

    MTA Loading Delay

    Posted the same issue a year ago and it didn't get any attention, looks like this one will be the same.
  5. King12

    MTA Loading Delay

    Hello there, I've been facing this issue for roughly 2 years, but never cared about it, and it's getting a bit annoying now. The problem is, that my game takes 30 seconds to start and load correctly. Also, I always get this message when the game starts. http://prntscr.com/l3n1n3 MTADiag: https://pastebin.mtasa.com/297658147 PML: https://upload.mtasa.com/u/148387134/Logfile.PML_
  6. Hello there, I don't know what is wrong but my vps isn't allowing clients to download files such as [map scripts, songs etc..] HTTP server file mismatch (freeroam) fr_client.lua [Got size:57088 MD5:A2FADFBEAEC9C87916AA217E82E8DEAC, wanted MD5:92D420578F6D170C6796A5F70FBA4A6D] Download error: HTTP server file mismatch (freeroam) fr_client.lua [Got size:57088 MD5:A2FADFBEAEC9C87916AA217E82E8DEAC, wanted MD5:92D420578F6D170C6796A5F70FBA4A6D] Download error: Error downloading requested files. HTTP response code said error. [The requested URL returned error: 404 Not Found] [music.mp3] All ports are opened (obviously). Also, files are unzipped and cached inside resource-cache. Server IP: 95.156.228.8:69
  7. addEventHandler("onClientResourceStart", resourceRoot, function() setPlayerHudComponentVisible( "crosshair", false ) end ) and for the meta: <meta> <script src="client.lua" type="client"/> </meta> It's better to have the resource on a separate folder, I don't recommend adding it to editor gamemode.
  8. -- Client side setPlayerHudComponentVisible ( "crosshair", false ) -- or this to hide every HUD component setPlayerHudComponentVisible ( "all", false )
  9. It's the fact that I want to replace the dff model of the canopy itself, and I actually tried a shader to make the parachute disappear but failed, since I really don't know anything about shaders. As you can see sometimes it disappears and sometimes not. struct PSInput { float4 Diffuse : COLOR0; }; float4 PixelShaderFunction( PSInput PS ) : COLOR0 { float4 color = PS.Diffuse; color.a = 0; return color; } technique { pass p0 { AlphaBlendEnable = TRUE; DestBlend = INVSRCALPHA; SrcBlend = SRCALPHA; PixelShader = compile ps_2_0 PixelShaderFunction(); } }
  10. In order to poll the password you have to do it this way: SERV_LAUNCH_PW = exports.db:sqlQuery("SELECT server_launch_pw FROM server_vars") local result = dbPoll (SERV_LAUNCH_PW, -1) if #result > 0 then local password = SERV_LAUNCH_PW[1].server_launch_pw; outputChatBox(password) end for the dbPoll, you can try this: -- use the database connection variable in (connection). function _Query (...) if connection then local queryS = dbQuery(connection, ... ) local result = dbPoll(queryS,-1) return result else return false end end -- Usage: local SERV_LAUNCH_PW = _Query ('SELECT server_launch_pw FROM server_vars') if ( #SERV_LAUNCH_PW > 0 ) then local password = SERV_LAUNCH_PW[1].server_launch_pw; outputChatBox(password) end
  11. The problem is, I couldn't find the dff ID for the parachute canopy (or something that changes it).
  12. local gRow = guiGridListGetSelectedItem ( gridlist1 ) if gRow >= 0 then -- player selected something else end guiGridListGetSelectedItem will return -1 for Row if an item wasn't selected.
  13. Hello there, I have looked everywhere but couldn't find anything. Does anyone have an idea about the parachute canopy dff model ID? or a way to replace it instead of .png shaders?
  14. King12

    MTA client start time

    This is the dump file, if you are interested. https://upload.mtasa.com/u/329386214/client_1.5.5-release-11790.1.000_core_0001d53e_5_CPxMb_00000000_55F3_4A8_F5A03_20171222_0454.zip_
  15. Hello there, lately I've been facing an annoying issue with my client, it takes like 30-60 seconds to startup the game. It started happening after I installed Corsair Utility Engine (A tool to control your keyobard). My MTADiag: https://pastebin.mtasa.com/366419670
  16. GUIEditor = { label = {}, window = {}, edit = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.staticimage[1] = guiCreateStaticImage(0.22, -0.02, 0.55, 0.99, "images/news.png", true) guiSetVisible(GUIEditor.staticimage[1],false) GUIEditor.staticimage[2] = guiCreateStaticImage(0.17, 0.03, 0.67, 0.97, "images/hand.png", false, GUIEditor.staticimage[1]) GUIEditor.edit[1] = guiCreateEdit(46, 36, 308, 22, "", false, GUIEditor.window[1]) end ) addEventHandler("onClientGUIClick", resourceRoot, function() if source == GUIEditor.staticimage[2] then setTimer(triggerServerEvent, 1000 * tonumber(guiGetText(GUIEditor.edit[1])) or 1000, 1, "send", localPlayer) end end ) addEvent("send",true) addEventHandler("send",getRootElement(), function () local x,y,z = getElementPosition ( client ) createExplosion ( x,y,z,0 ) createExplosion ( x,y,z,0 ) end)
  17. أنت ماعرفت ال source من راح يكون عليه الانفجار؟
  18. GUIEditor = { label = {}, window = {}, edit = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.staticimage[1] = guiCreateStaticImage(0.22, -0.02, 0.55, 0.99, "images/news.png", true) guiSetVisible(GUIEditor.staticimage[1],false) GUIEditor.staticimage[2] = guiCreateStaticImage(0.17, 0.03, 0.67, 0.97, "images/hand.png", false, GUIEditor.staticimage[1]) GUIEditor.edit[1] = guiCreateEdit(46, 36, 308, 22, "", false, GUIEditor.window[1]) end ) addEventHandler("onClientGUIClick", resourceRoot, function() if source == GUIEditor.staticimage[2] then setTimer(triggerServerEvent, 1000 * tonumber(guiGetText(GUIEditor.edit[1])) or 1, 1, "send", resourceRoot) end end ) -- server side addEvent("send", true) addEventHandler("send", resourceRoot, function () -- blabla.. end ) التايمر يبدأ من 50 جزء من الثانية وأنت تحط رقم 1, صححت الكود بحيث أنه لو حطيت رقم 1 راح يخليه ثانيه وكذا..
  19. addEventHandler("onClientGUIClick", resourceRoot, function () if source == button1 then local gRow, gColumn = guiGridListGetSelectedItem ( gridList ) if gRow >= 0 then guiSetVisible ( gui, false) end end end )
  20. ما أنتبهت لكلامك, تفضل: GUIEditor = { label = {}, window = {}, edit = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.staticimage[1] = guiCreateStaticImage(0.22, -0.02, 0.55, 0.99, "images/news.png", true) guiSetVisible(GUIEditor.staticimage[1],false) GUIEditor.staticimage[2] = guiCreateStaticImage(0.17, 0.03, 0.67, 0.97, "images/hand.png", false, GUIEditor.staticimage[1]) GUIEditor.edit[1] = guiCreateEdit(46, 36, 308, 22, "", false, GUIEditor.window[1]) end ) addEventHandler("onClientGUIClick", resourceRoot, function() if source == GUIEditor.staticimage[2] then setTimer(triggerServerEvent, tonumber(guiGetText(GUIEditor.edit[1])) or 100, 1, "send", resourceRoot) end end ) -- server side addEvent("send", true) addEventHandler("send", resourceRoot, function () -- blabla.. end )
  21. -- Client side addEventHandler("onClientResourceStart", resourceRoot, function() window1 = guiCreateWindow(509, 175, 311, 452, "Revive Panel", false) guiWindowSetSizable(window1, false) guiSetVisible( window1 ,false) gridlist = guiCreateGridList(13, 26, 288, 341, false, window1) guiGridListAddColumn(gridlist, "Players", 0.9) Button1 = guiCreateButton(17, 379, 139, 63, "Revive Player", false, window1) Button2 = guiCreateButton(166, 379, 135, 63, "Close", false, window1) guiGridListClear(gridlist) end ) addCommandHandler('rp', function () guiSetVisible(window1,not guiGetVisible(window1)) showCursor(guiGetVisible(window1)) changeGridListToPlayers ( gridlist, 1 ) end ) -- Close button addEventHandler ( "onClientGUIClick",root, function () if (source == Button2) then guiSetVisible( window1 ,false) showCursor(false) end end ) -- Health button addEventHandler ( "onClientGUIClick", resourceRoot, function () if (source == Button1) then local gRow, gColumn = guiGridListGetSelectedItem ( gridlist ) if gRow >= 0 then local PlayerName = guiGridListGetSelectedItemText ( gridlist ) local target = getPlayerFromName(PlayerName) triggerServerEvent("onPlayerHealed", resourceRoot, target) guiSetVisible( window1 ,false) showCursor(false) else outputChatBox("Select a player to heal!", 0, 255, 0) end end end) -- [[ Useful functions ]] -- function guiGridListGetSelectedItemText ( gridList, column ) local item = guiGridListGetSelectedItem ( gridList ) if item then return guiGridListGetItemText ( gridList, item, column or 1 ) end return false end function changeGridListToPlayers ( gridlist, column ) if type ( column ) == 'number' and type ( range ) == 'number' and getElementType ( gridlist ) == 'gui-gridlist' then guiGridListClear ( gridlist ) for i,v in ipairs ( getElementsByType ( 'player' ) ) do if ( v ~= localPlayer ) then local row = guiGridListAddRow ( gridlist ) return guiGridListSetItemText ( gridlist, row, column, getPlayerName ( v ), false, false ) end end else return false end end -- Server side. addEvent("onPlayerHealed", true) addEventHandler("onPlayerHealed", resourceRoot, function (target) if isElement (target) then outputChatBox( getPlayerName(target) .. " has been healed.", client, 0, 255, 0) setElementHealth( target, 100 ) end end)
  22. GUIEditor = { label = {}, window = {}, edit = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.staticimage[1] = guiCreateStaticImage(0.22, -0.02, 0.55, 0.99, "images/news.png", true) guiSetVisible(GUIEditor.staticimage[1],false) GUIEditor.staticimage[2] = guiCreateStaticImage(0.17, 0.03, 0.67, 0.97, "images/hand.png", false, GUIEditor.staticimage[1]) GUIEditor.edit[1] = guiCreateEdit(46, 36, 308, 22, "", false, GUIEditor.window[1]) end ) addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.staticimage[2] then setTimer(triggerServerEvent, 500, 1, "send", resourceRoot, tonumber(guiGetText(GUIEditor.edit[1]))) end end ) -- server side addEvent("send", true) addEventHandler("send", resourceRoot, function ( number ) -- blabla.. end )
  23. على كذا نستخدم الايفنت حق client-side addEventHandler("onClientPlayerWeaponSwitch", root, function () toggleControl ( 'next_weapon', false ) toggleControl ( 'previous_weapon', false ) outputChatBox( "Weapons are not permitted!", 255, 0, 0) setPedWeaponSlot( localPlayer, 0 ) end) "onClientPreRender" المفروض ماتستخدمها لأنه فيه أحداث مخصصة لهذي الأمور.
  24. addEventHandler("onPlayerWeaponSwitch", root, function () takeAllWeapons (source) toggleControl ( source, 'fire', false ) outputChatBox( "Weapons are not permitted!", source, 255, 0, 0) end) وخلصنا.
  25. Use Dutchman101's script and learn about textures. https://community.mtasa.com/?p=resources&s=details&id=14907
×
×
  • Create New...