Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. JR10

    Sounds.

    Show your meta.xml.
  2. 1. If it's a team it's auto colored by the scoreboard according to it's color. 2. Use spawnPlayer arguments, check the wiki page: spawnPlayer 3. addEventHandler ( "onPlayerWasted" , root , function ( ) fadeCamera ( source,false ) setTimer ( spawnPlayer , 1000 , 1 , source, x, y, z ) ) setTimer ( fadeCamera , 1000 , 1 , source,true ) end)
  3. JR10

    Sounds.

    What does it say in /debugscript 3? Show your meta.xml
  4. This fileDelete way is not working, I tested it, I added it to the very bottom of the script, when I disconnect before downloaded I have it.
  5. JR10

    [TUT] SQLite

    Make a simple saving system. Check some tutorials on the web.
  6. JR10

    Script

    viewtopic.php?f=148&t=38233
  7. g_Root = getRootElement() exports.scoreboard:addScoreboardColumn("Country",root,2,150.0 ) addEventHandler ( "onPlayerJoin" , root , function ( ) local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Country",":admin/client/images/flags/"..flag..".png") else setElementData ( source , "Country" , "N/A") end end) countryNames = { ['AD'] = 'Andorra', ['AE'] = 'United Arab Emirates', ['AF'] = 'Afghanistan', ['AG'] = 'Antigua and Barbuda', ['AI'] = 'Anguilla', ['AL'] = 'Albania', ['AM'] = 'Armenia', ['AO'] = 'Angola', ['AP'] = 'ARIPO', ['AR'] = 'Argentina', ['AT'] = 'Austria', ['AU'] = 'Australia', ['AW'] = 'Aruba', ['AZ'] = 'Azerbaijan', ['BA'] = 'Bosnia and Herzegovina', ['BB'] = 'Barbados', ['BD'] = 'Bangladesh', ['BE'] = 'Belgium', ['BF'] = 'Burkina Faso', ['BG'] = 'Bulgaria', ['BH'] = 'Bahrain', ['BI'] = 'Burundi', ['BJ'] = 'Benin', ['BM'] = 'Bermuda', ['BN'] = 'Brunei Darussalam', ['BO'] = 'Bolivia', ['BQ'] = 'Bonaire', ['BR'] = 'Brazil', ['BS'] = 'Bahamas', ['BT'] = 'Bhutan', ['BV'] = 'Bouvet Island', ['BW'] = 'Botswana', ['BY'] = 'Belarus', ['BZ'] = 'Belize', ['CA'] = 'Canada', ['CD'] = 'Congo', ['CF'] = 'Central African Republic', ['CG'] = 'Congo', ['CH'] = 'Switzerland', ['CI'] = 'Cote d?Ivoire', ['CK'] = 'Cook Islands', ['CL'] = 'Chile', ['CM'] = 'Cameroon', ['CN'] = 'China', ['CO'] = 'Colombia', ['CR'] = 'Costa Rica', ['CU'] = 'Cuba', ['CV'] = 'Cape Verde', ['CW'] = 'Curacao', ['CY'] = 'Cyprus', ['CZ'] = 'Czech Republic', ['DE'] = 'Germany', ['DJ'] = 'Djibouti', ['DK'] = 'Denmark', ['DM'] = 'Dominica', ['DO'] = 'Dominican Republic', ['DZ'] = 'Algeria', ['EC'] = 'Ecuador', ['EE'] = 'Estonia', ['EG'] = 'Egypt', ['EH'] = 'Western Sahara', ['ER'] = 'Eritrea', ['ES'] = 'Spain', ['ET'] = 'Ethiopia', ['FI'] = 'Finland', ['FJ'] = 'Fiji', ['FK'] = 'Malvinas', ['FO'] = 'Faroe Islands', ['FR'] = 'France', ['GA'] = 'Gabon', ['GB'] = 'United Kingdom', ['GD'] = 'Grenada', ['GE'] = 'Georgia', ['GG'] = 'Guernsey', ['GH'] = 'Ghana', ['GI'] = 'Gibraltar', ['GL'] = 'Greenland', ['GM'] = 'Gambia', ['GN'] = 'Guinea', ['GQ'] = 'Equatorial Guinea', ['GR'] = 'Greece', ['GT'] = 'Guatemala', ['GW'] = 'Guinea-Bissau', ['GY'] = 'Guyana', ['HN'] = 'Honduras', ['HR'] = 'Croatia', ['HT'] = 'Haiti', ['HU'] = 'Hungary', ['ID'] = 'Indonesia', ['IE'] = 'Ireland', ['IL'] = 'Israel', ['IM'] = 'Isle of Man', ['IN'] = 'India', ['IQ'] = 'Iraq', ['IR'] = 'Iran', ['IS'] = 'Iceland', ['IT'] = 'Italy', ['JE'] = 'Jersey', ['JM'] = 'Jamaica', ['JO'] = 'Jordan', ['JP'] = 'Japan', ['KE'] = 'Kenya', ['KG'] = 'Kyrgyzstan', ['KH'] = 'Cambodia', ['KI'] = 'Kiribati', ['KM'] = 'Comoros', ['KN'] = 'Saint Kitts and Nevis', ['KP'] = 'Korea', ['KR'] = 'Korea', ['KW'] = 'Kuwait', ['KY'] = 'Cayman Islands', ['KZ'] = 'Kazakhstan', ['LA'] = 'Lao People?s Republic', ['LB'] = 'Lebanon', ['LC'] = 'Saint Lucia', ['LI'] = 'Liechtenstein', ['LK'] = 'Sri Lanka', ['LR'] = 'Liberia', ['LS'] = 'Lesotho', ['LT'] = 'Lithuania', ['LU'] = 'Luxembourg', ['LV'] = 'Latvia', ['LY'] = 'Libyan Arab Jamahiriya', ['MA'] = 'Morocco', ['MC'] = 'Monaco', ['MD'] = 'Moldova', ['ME'] = 'Montenegro', ['MG'] = 'Madagascar', ['MK'] = 'Macedonia', ['ML'] = 'Mali', ['MM'] = 'Myanmar', ['MN'] = 'Mongolia', ['MO'] = 'Macao', ['MP'] = 'Northern Mariana Islands', ['MR'] = 'Mauritania', ['MS'] = 'Montserrat', ['MT'] = 'Malta', ['MU'] = 'Mauritius', ['MV'] = 'Maldives', ['MW'] = 'Malawi', ['MX'] = 'Mexico', ['MY'] = 'Malaysia', ['MZ'] = 'Mozambique', ['NA'] = 'Namibia', ['NE'] = 'Niger', ['NG'] = 'Nigeria', ['NI'] = 'Nicaragua', ['NL'] = 'Netherlands', ['NO'] = 'Norway', ['NP'] = 'Nepal', ['NR'] = 'Nauru', ['NZ'] = 'New Zealand', ['OM'] = 'Oman', ['PA'] = 'Panama', ['PE'] = 'Peru', ['PG'] = 'Papua New Guinea', ['PH'] = 'Philippines', ['PK'] = 'Pakistan', ['PL'] = 'Poland', ['PT'] = 'Portugal', ['PW'] = 'Palau', ['PY'] = 'Paraguay', ['QA'] = 'Qatar', ['RO'] = 'Romania', ['RS'] = 'Serbia', ['RU'] = 'Russian Federation', ['RW'] = 'Rwanda', ['SA'] = 'Saudi Arabia', ['SB'] = 'Solomon Islands', ['SC'] = 'Seychelles', ['SD'] = 'Sudan', ['SE'] = 'Sweden', ['SG'] = 'Singapore', ['SH'] = 'Saint Helena', ['SI'] = 'Slovenia', ['SK'] = 'Slovakia', ['SL'] = 'Sierra Leone', ['SM'] = 'San Marino', ['SN'] = 'Senegal', ['SO'] = 'Somalia', ['SR'] = 'Suriname', ['ST'] = 'Sao Tome and Principe', ['SV'] = 'Salvador', ['SX'] = 'Sint Maarten (Dutch part)', ['SY'] = 'Syrian Arab Republic', ['SZ'] = 'Swaziland', ['TC'] = 'Turks and Caicos Islands', ['TD'] = 'Chad', ['TG'] = 'Togo', ['TH'] = 'Thailand', ['TJ'] = 'Tajikistan', ['TL'] = 'Timor?Leste', ['TM'] = 'Turkmenistan', ['TN'] = 'Tunisia', ['TO'] = 'Tonga', ['TR'] = 'Turkey', ['TT'] = 'Trinidad and Tobago', ['TV'] = 'Tuvalu', ['TW'] = 'Taiwan', ['TZ'] = 'Tanzania', ['UA'] = 'Ukraine', ['UG'] = 'Uganda', ['US'] = 'United States of America', ['UY'] = 'Uruguay', ['UZ'] = 'Uzbekistan', ['VA'] = 'Holy See', ['VC'] = 'Saint Vincent', ['VE'] = 'Venezuela', ['VG'] = 'Virgin Islands', ['VN'] = 'Viet Nam', ['VU'] = 'Vanuatu', ['WS'] = 'Samoa', ['YE'] = 'Yemen', ['ZA'] = 'South Africa', ['ZZ'] = 'n/a', ['ZM'] = 'Zambia', ['ZW'] = 'Zimbabwe' } addEventHandler("onPlayerJoin", g_Root, function() local country = exports["admin"]:getPlayerCountry(source) if country then setElementData(source,"Country",countryNames[country]) outputChatBox('[JOIN] #ffffff' .. getPlayerName(source) .. '#00FF09 has joined the server From #FF8900[' .. tostring(countryNames[countryCode]) .. '] ', getRootElement(), 2, 255, 2, true) else setElementData(source,"Country","N/A") outputChatBox('[JOIN] #ffffff' .. getPlayerName(source) .. '#00FF09 has joined the server',getRootElement(),255,255,255,true) end end) addEventHandler('onPlayerChangeNick', g_Root, function(oldNick, newNick) outputChatBox('[Change-Nick] #ffffff' .. oldNick .. '#03B4FF is now known as #ffffff' .. newNick, getRootElement(), 3, 180, 255, true) end) addEventHandler('onPlayerQuit', g_Root, function(reason)
  8. JR10

    Help

    What you're asking for is quite easy, couldn't Xeno complete his favour? createObject createPickup moveObject
  9. You can also shorten the code to be: function ViewGUI () guiSetVisible (window,not guiGetVisible ( window ) ) showCursor(guiGetVisible (window)) end function binds () bindKey ( "F1", "down", ViewGUI ) end addCommandHandler ( "bindme", binds )
  10. You've a wrong function in removeEventHandler, it should be 'NPCnametag' not 'HandleTheRendering'. local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local maxrange = 6 function NPCnametag() local pedX,pedY,pedZ = getElementPosition(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition (pedX,pedY,pedZ) local cameraX,cameraY,cameraZ = getCameraMatrix() if sx then if getDistanceBetweenPoints3D(cameraX,cameraY,cameraZ,pedX,pedY,pedZ) <= maxrange then dxDrawText("hi",sx,sy-100,screenWidth, screenHeight+2,tocolor ( 255, 0, 0, 255 ), 2,"sans") end end end function HandleTheRendering() addEventHandler("onClientRender",rootElement, NPCnametag) setTimer(dxDrawRe,1000,1) end addEvent("HandleTheRendering", true) addEventHandler("HandleTheRendering", getRootElement(), HandleTheRendering) function dxDrawRe() removeEventHandler("onClientRender", rootElement, NPCnametag) end
  11. It doesn't save the script file in the client's hard disk. But it's bugged, it was added to meta.xml wiki page, but it's removed now. https://wiki.multitheftauto.com/index.ph ... ldid=29111 https://wiki.multitheftauto.com/index.ph ... ldid=29193
  12. Because you're not using setElementData to update. function addPlayerZombieXP(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieXP = getAccountData(account,"Experience points") if not zombieXP then setAccountData(account,"Experience points",0) end setAccountData(account,"Experience points",tonumber(zombieXP)+10) setElementData ( killer , "Experience points" , tonumber(zombieXP)+10) end addEventHandler("onZombieWasted", getRootElement(), addPlayerZombieXP)
  13. <script src = "client.lua" type = "client" protected = "true" /> Doesn't that solve the problem?
  14. JR10

    1.2 to 1.3

    What doesn't work with it, any errors?
  15. JR10

    سؤال

    function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end
  16. Are you sure? It should work, because you're triggering it with a source.
  17. JR10

    GTA 5 Online ?

    I hope they don't, or they will have to divide their work on 2 projects.
  18. It's not wrong, you added player argument and edited outputChatBox, which won't work, because it's not triggered with an argument.
  19. Is hedit resource running? Show hedit meta.xml. Show your meta.xml.
  20. There is no need to use a table, since this is client side. local enabled = false local txd bindKey( "m","down", function( ) if not enabled then txd = engineLoadTXD ( "vgncarshade1.txd" ) engineImportTXD( txd, 3458 ) else destroyElement( txd ) end enabled = not enabled end )
  21. JR10

    Cancel spawn

    function privatet () local steam = getTeamFromName("Admin") if (getPlayerTeam(source) == steam and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then killPed(source) outputChatBox("You are not part of the sarg team." source, 255, 0, 0) end end addEventHandler("onPlayerSpawn", getRootElement(), privatet)
×
×
  • Create New...