Jump to content

myyusuf

Members
  • Posts

    120
  • Joined

  • Last visited

Everything posted by myyusuf

  1. i dont know how to do it.
  2. how can i use that? give me a example please
  3. hello. local name, author, lastTimePlayed, playedCount, modename local startTick local month = {"January","February","March","April","May","June","Juli","August","September","October","November","December"} local screenWidth, screenHeight = guiGetScreenSize() local endPosition = screenHeight-140 local moveback = false function timestampToDate(stamp) local time = getRealTime(stamp) return string.format("%d %s %02d:%02d",time.monthday,month[time.month+1],time.hour,time.minute) end function handleMapInfo(mapInfo) name = mapInfo.name or "Unknown" author = mapInfo.author or "Unknown" lastTimePlayed = timestampToDate(mapInfo.lastTimePlayed) or "Unknown" playedCount = tostring(mapInfo.playedCount or "Unknown") modename = mapInfo.modename ~= "Destruction derby" and mapInfo.modename or "Destruction derby" position = screenHeight+90 movePosition = 5 tickCount = 400 moveback = false alpha = 0 addEventHandler("onClientRender",getRootElement(),drawMapInfo) end addEvent("onClientMapStarting",true) addEventHandler("onClientMapStarting",getRootElement(),handleMapInfo) function drawMapInfo () if position == endPosition then if tickCount == 0 then moveback = true end tickCount = tickCount-1 movePosition = 0 end if position >= screenHeight+91 then removeEventHandler("onClientRender",getRootElement(),drawMapInfo) end if moveback then movePosition = -2.5 alpha = alpha - 10 end alpha = alpha + 5 if alpha > 255 then alpha = 255 elseif alpha < 0 then alpha = 0 end local heighResize = dxGetFontHeight(1.15, "default-bold") local widthRezise1 = dxGetTextWidth("Map - "..name,1.15,"default-bold") local widthRezise2 = dxGetTextWidth("Lasttime played - "..lastTimePlayed,1.15,"default-bold") local widthRezise3 = dxGetTextWidth("By - "..author,1.15,"default-bold") if widthRezise1 > widthRezise2 and widthRezise1 > widthRezise3 then widthRezise = widthRezise1 elseif widthRezise2 > widthRezise1 and widthRezise2 > widthRezise3 then widthRezise = widthRezise2 elseif widthRezise3 > widthRezise1 and widthRezise3 > widthRezise2 then widthRezise = widthRezise3 end --Background dxDrawImage(screenWidth/2-widthRezise/2-8,position-movePosition-(heighResize-3),widthRezise+16,140+heighResize, "bgr.png",0,0,0,tocolor(200,200,200,alpha)) --Map dxDrawingColorText ( "#FF9900Map - #FFFFFF"..name,screenWidth/2,position-movePosition+heighResize,screenWidth/2,position-movePosition+heighResize, tocolor(255,255,255,alpha), alpha, 1.15, "default-bold", "center", "bottom", false, false, false ) --By dxDrawingColorText ( "#FF9900By - #FFFFFF"..author,screenWidth/2,position-movePosition+heighResize*2,screenWidth/2,position-movePosition+heighResize*2, tocolor(255,255,255,alpha), alpha, 1.15, "default-bold", "center", "bottom", false, false, false ) --Played dxDrawingColorText ( "#FF9900Played - #FFFFFF"..playedCount.." times",screenWidth/2,position-movePosition+heighResize*3,screenWidth/2,position-movePosition+heighResize*3, tocolor(255,255,255,alpha), alpha, 1.15, "default-bold", "center", "bottom", false, false, false ) --Last time dxDrawingColorText ( "#FF9900Lasttime played - #FFFFFF"..lastTimePlayed,screenWidth/2,position-movePosition+heighResize*4,screenWidth/2,position-movePosition+heighResize*4, tocolor(255,255,255,alpha), alpha, 1.15, "default-bold", "center", "bottom", false, false, false ) --Mode dxDrawingColorText ( "#FF9900Mode - #FFFFFF"..modename,screenWidth/2,position-movePosition+heighResize*5,screenWidth/2,position-movePosition+heighResize*5, tocolor(255,255,255,alpha), alpha, 1.15, "default-bold", "center", "bottom", false, false, false ) position = position - movePosition end function dxDrawingColorText ( text,left,top,right,bottom,color,scale,font,alignX,alignY) dxDrawingColorText ( text, left+scale, top , right+scale, bottom, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left+scale, top+scale , right+scale, bottom+scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left, top+scale , right, bottom+scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left-scale, top+scale , right-scale, bottom+scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left-scale, top , right-scale, bottom, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left-scale, top-scale , right-scale, bottom-scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left, top-scale , right, bottom-scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left+scale, top-scale , right+scale, bottom-scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left, top , right, bottom, color,scale,font,alignX,alignY) end i have got this warning: info.lua:77: stack overflow
  4. no. like on this resource. i wanted client side functions. name = mapInfo.name or "Unknown" author = mapInfo.author or "Unknown" lastTimePlayed = timestampToDate(mapInfo.lastTimePlayed) or "Unknown" spawnPointCount = tostring(mapInfo.spawnPointCount or "Unknown") playedCount = tostring(mapInfo.playedCount or "Unknown") modename = mapInfo.modename ~= "Destruction derby" and mapInfo.modename or "DD / DM"
  5. can you say me the all mapInfo functions like mapInfo.playedCount.
  6. myyusuf

    playSound3D

    no function RandomMusic() local inci = inci local siker = siker local sound = playSound3D( "http://www.blahblah.com/ogg/".. tostring( math.random( inci, siker ) ) .. ".ogg" ); end addEventHandler ( "onClientPlayerWasted", getRootElement(), RandomMusic ) do you mean that?
  7. myyusuf

    playSound3D

    function RandomMusic() local sound = playSound3D( "http://www.blahblah.com/ogg/".. tostring( math.random( inci, siker ) ) .. ".ogg" ); end addEventHandler ( "onClientPlayerWasted", getRootElement(), RandomMusic ) is this code right? i write in on my phone. i cant test it now
  8. myyusuf

    chat colour

    server side local function playerChat(message, messageType) if messageType == 0 then cancelEvent() local red, green, blue = getPlayerNametagColor(source) outputChatBox(getPlayerName(source)..": #cc0000"..message, root, red, green, blue, true ) outputServerLog("CHAT: "..getPlayerName(source)..": "..message) end end addEventHandler("onPlayerChat", root, playerChat)
  9. client-side: function hideradar () showPlayerHudComponent ( source, "radar", false ) end is this code right? i cant test it now.
  10. myyusuf

    gui

    if you want a picture in gui use this guiCreateStaticImage @ Draken but he want just the image show not gui i think okay i got it. how can i set movable image? guiWindowSetMovable ( x, false ) it isnt running.
  11. myyusuf

    vehcolor

    function zaa(theVehicle) if getPlayerTeam (source) then local r, g, b = getTeamColor ( getPlayerTeam ( source) ) if theVehicle then setVehicleColor ( theVehicle, r,g,b,r,g,b) end end end addEventHandler("onPlayerVehicleEnter",getRootElement(),zaa) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),zaa) this must worked
  12. myyusuf

    vehcolor

    function setVehColor ( playerSource ) local teamOfPlayer = getPlayerTeam ( playerSource ) if ( teamOfPlayer ) then local r, g, b = getTeamColor ( teamOfPlayer ) setVehicleColor ( source, r, g, b, r, g, b, r, g, b, r, g, b ) end end addEventHandler ( "onVehicleEnter", getRootElement ( ), setVehColor ) addEventHandler ( "onPlayerPickUpRacePickup", getRootElement ( ), setVehColor ) maybe?
  13. myyusuf

    gui

    how can i use picture as a gui window? i made something on guieditor, is there anyway to do that?
  14. myyusuf

    JoinQuit

    Then your country is not in the table! exports.scoreboard:addScoreboardColumn('country') 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', } function showHome () local countryCode = exports["admin"]:getPlayerCountry(source) setElementData(source,"country",countryNames[countryCode]) outputChatBox(getPlayerName(source) .." has joined the game. [".. tostring(countryNames[countryCode]) .."]",getRootElement(), 255, 255, 255, true ) end addEventHandler("onPlayerJoin",getRootElement(),showHome) use this one
  15. myyusuf

    Chat

    he means that i think bindKey("ctrl","down", function() outputChatBox( getPlayerName ( player) .. ": says who want to me in the ass?", root,0,0,0,true) end )
  16. myyusuf

    Chat

    say? it must be outPutChatBox if you want to write that on chat.
  17. myyusuf

    JoinQuit

    local country = exports["admin"]:getPlayerCountry(source) g_Root = getRootElement() addEventHandler('onPlayerJoin',g_Root, function () outputChatBox('[JOIN] #ffffff' .. getPlayerName(source) .. '#DB8181 joined game!' .. country', getRootElement(), 219, 129, 129, true) end ) addEventHandler('onPlayerChangeNick', g_Root, function(oldNick, newNick) outputChatBox('[Change-Nick] #ffffff' .. oldNick .. '#DB8181 is now known as #ffffff' .. newNick, getRootElement(), 219, 129, 129, true) end ) addEventHandler('onPlayerQuit', g_Root, function(reason) outputChatBox('[' .. reason .. '] #ffffff' .. getPlayerName(source) .. ' #DB8181disconnected.', getRootElement(), 255, 0, 0, true) end ) also you need to give admin rights to script.
  18. https://www.youtube.com/watch?v=t1YTxLaf ... re=channel hi guys, do you have this awesome resource? i really need it.
  19. it shows only for 1 time. when i change 1 to 0 it shows only 1 time. after nothing shows.
  20. addEvent ( "GUIwins", true ) addEventHandler ( "GUIwins", root, function ( wins ) if ( wins ) then local winslabel = guiCreateLabel ( 49,72,246,21,"" ..wins.. "",false,GUIEditor_Tab[1]) guiSetText ( winslabel, elementType ) setTimer ( guiSetText, 50, 0, winslabel, "" ) end end ) addEvent ( "GUIpoints", true ) addEventHandler ( "GUIpoints" ,root, function ( points ) if ( points ) then local pointslabel = guiCreateLabel ( 54,101,246,21,"" ..points.. "",false,GUIEditor_Tab[1]) guiSetText ( pointslabel, elementType ) setTimer ( guiSetText, 50, 0, pointslabel, "" ) end end ) addEvent ( "GUIsecond", true ) addEventHandler ( "GUIsecond",root, function ( second ) if ( second ) then local secondlabel = guiCreateLabel ( 98,131,246,21,"" ..second.. "",false,GUIEditor_Tab[1]) guiSetText ( secondlabel, elementType ) setTimer ( guiSetText, 50, 0, secondlabel, "" ) end end ) addEvent ( "GUIthird", true ) addEventHandler ( "GUIthird", root, function ( third ) if ( third ) then local thirdlabel = guiCreateLabel ( 88,160,246,21,"" ..third.. "",false,GUIEditor_Tab[1]) guiSetText ( thirdlabel, elementType ) setTimer ( guiSetText, 50, 0, thirdlabel, "" ) end end ) it doenst show anything..
  21. thank you it worked. but i have another problem now. when timer triggered new data from serverside, old data wasnt deleted. so here is the picture. sorry for my bad english. i hope you understand me.
  22. well i dont know to use settimer. can you give me an example?
×
×
  • Create New...