-
Posts
1,028 -
Joined
-
Last visited
-
Days Won
1
Everything posted by ..:D&G:..
-
Hello guys, I just found out about this error from debugscript attempt to perform arithmetic on a boolean value function updateInventory( ) windows.inventory[2].panes = { } local t = exports.items:get( getLocalPlayer( ) ) if t then for k, v in ipairs( t ) do local image = exports.items:getImage( v.item, v.value, v.name ) local width = dxGetTextWidth( v.name, 1, "clear" ) + 20 local height = 10 * ( 3 ) table.insert( windows.inventory[2].panes, { image = image or ":players/images/skins/-1.png", onHover = function( cursor, pos ) local width2 = dxGetTextWidth( v.name, 1, "clear" ) + 5 dxDrawRectangle( pos[1], pos[2], pos[3] - pos[1], pos[4] - pos[2], tocolor( unpack( getKeyState( 'delete' ) and { 255, 0, 0, 63 } or { 255, 255, 0, 63 } ) ) ) dxDrawRectangle( pos[1] + 64, pos[2] - 32, width2, height, tocolor( 0, 0, 0, 255 ), true ) dxDrawText( v.name, pos[1] + 110, pos[2] , pos[1] + width, pos[2] - height, tocolor( 255, 255, 255, 255 ), 1, "clear", "center", "center", false, false, true ) end, The error is for this line: local width = dxGetTextWidth( v.name, 1, "clear" ) + 20 Can anyone tell me what's wrong please?
-
Try this (not tested) imgW = 500 imgH = 90 admins = "" players = getElementsByType ( "player" ) function adminLogo() for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then if (admins == "") then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, -- s8) --> hZ = hZ + 0.5 local pX,pY,pZ = getPedBonePosition(localPlayer, -- s8) --> pZ = pZ + 0.5 if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) then local sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ) local relative = (50 - sD) / 50 if relative > 0 then local iW = imgW * relative local iH = imgH * relative local iX = sX - (iW / 2) local iY = sY - (iH / 2) dxDrawImage(iX, iY, iW, iH, "1.png") end end end end end end end addEventHandler("onClientRender", root, adminLogo)
-
In primul rand, chiar daca nu am facut scoala in Romania, tot stiu cum se scrie "pancarde". Deci, daca vrei un slideshow, ai nevoie de un shader (fisier .fx) care face asa ceva.
-
Anyone?
-
Hello guy, I am using MTA Paradise for a very small project of mine (and also to learn more scripting) and when I try to buy a phone from the electronics shop, I don't get it in my inventory. There are no errors that could tell me why or what's wrong, but here is the function: Everything looks fine to me, I don't know what's the problem here...
-
Can you tell me what was wrong and how you fixed it please?
-
Sure, here you go: local groups = { { groupName = "MTA Trial Moderators", groupID = false, aclGroup = "Trial", displayName = "Trial", nametagColor = { 255, 255, 191 }, priority = 3 }, { groupName = "MTA Moderators", groupID = false, aclGroup = "Moderator", displayName = "Moderator", nametagColor = { 255, 255, 127 }, priority = 5 }, { groupName = "MTA Administrators", groupID = false, aclGroup = "Admin", displayName = "Administrator", nametagColor = { 255, 255, 0 }, priority = 10, defaultForFirstUser = true }, { groupName = "Developers", groupID = false, aclGroup = "Developer", displayName = "Developer", nametagColor = { 127, 255, 127 }, priority = 20, defaultForFirstUser = true }, }
-
Hey guys, I keep getting an error, from the isObjectInACLGroup and I don't know why.. The error is: Expected acl-group at argument 2, got boolean Function: function getGroups( player ) local g = { } if p[ player ] then for key, value in ipairs( groups ) do if isObjectInACLGroup( "user." .. p[ player ].username, aclGetGroup( value.aclGroup ) ) then table.insert( g, value ) end end table.sort( g, function( a, b ) return a.priority > b.priority end ) end return g end Now, I can't really understand these errors, they don't make sense to me (but they will once..), so if anyone knows why I keep getting the error, please let me know
-
Mai omule, tu vrei scriptul care il avea vR-ul, deci, daca cineva ti-l da inseamna ca a fost furat.
-
Folosesti un gamemode de roleplay cumva?
-
The line song = playSound("http://example.com/song.mp3") is in another function, I am only triggering that line from another function.
-
Thanks, that worked, but only for stopSound. After I unchecked the box, it doesn't play the sound again and I get the following error: Bad argument @ 'playSound' [Expected string at argument 1]
-
Nope, and I don't think that will work
-
Ok, thanks for helping me I will go to a Dell store, and ask them what GPU will they recommend me for the PSU and CPU that I have, and if I need to change the CPU or PSU, I will. Thank again for helping me
-
Hello, I am trying to make something but ehm... I made a function which stops a song when a checkbox (songcheckbox) is checked, and play it when it's not. function checkboxSong() if ( getElementType(songcheckbox) == "gui-checkbox" ) then if (guiCheckBoxGetSelected(songcheckbox)) then stopSound(song) else playSound(song) end end end addEventHandler("onClientGUIClick", root, checkboxSong, false) The song line is in a function before this one, and it looks something like this: song = playSound("http://example.com/song.mp3") Now, I don't get why it isn't working Can someone please tell me what's wrong here? Thank you.
-
I tried to make my own PC, but I had to spend like £800 on it, and it wasn't even in the middle what I wanted. I have a laptop which has an AMD C-50 1.0GHz processor, and AMD Raderon 6000 HD 2GB (or something like that), and games run ok on low or medium. I want to get this PC at least a bit better than my laptop. Btw, in the first post, I specified a link to a GPU that I found on dell's website and said it will be compatible with my PC, should I buy that GPU? And also, what CPU you recommend me? Also., today I just added 4GB to the PC, and it only reads 3.24GB (it doesn't say the "usable" thing), does that tell me that my motherboard is starting to deteriorate? P.S: I started playing Spec Ops: The Line on my laptop (works alright on low) and games like that, ARMA 2-3, GTA 4/EFLC, and I also wanted to play watch dogs (yeah... I am just dreaming)
-
Hey, thanks for replying. I don't think I can change the CPU to a quad, as my motherboard will not support it. Also, I don't want to change the motherboard, as this will be like buying another PC... So, what should I do? Buy another PC, or get a better PSU and see if I can find a GPU that can fit with my CPU? Because I can just simply find another PC than just changing the motherboard..
-
Hello guys, I have a Dell Inspiron 530 and I was thinking of upgrading the video card, as most games won't work. I posted here because I know some of you guys, have a real good knowledge about PCs, so yeah.. So, I went to Dell's website and I saw a good video card compatible with my PC. http://accessories.us.dell.com/sna/Popu ... SavedItems I don't really know if it really compatible, as I made some research, and most video cards won't work on my Inspiron 530 because of the PSU which is a 300w. I don't really wanna buy a new PSU, as I am concentrating my £80 budget on the GPU, so I want to know if that GPU is good and really fits my PC, or, please recommend me the a good GPU that could (I want it to be at least 2GB) Thank you!
-
Tu îți dai seama că jucătorii nici nu știu de forum.mtasa, nu? Apropo, câte postări ai de gând să faci? Ăstă e cam al cincilea... -.-
-
Well it did when I made this topic (about 1 week ago) but the guy deleted that topic now..
-
Does anyone recognise this User Control Panel? viewtopic.php?f=126&t=78794
-
No description https://community.multitheftauto.com/index.php?p= ... ls&id=9824 DONE
-
Hello, how can I make a DX Image to change its size as the text in a lable? For example when I guiSetText a lable, I want the DX Image to be as long as the text. Thanks.
-
Hello, I got a script where I need a picture to be on the whole screen, but I need the chat text to be visible in the front of the picture, as the picture is on the top of the chat text. I also need to mention that the images is made with guiCreateImage
-
I got this in my acl, so I don't need to add every resource in acl every time I have to: <object name="resource.*"></object>