Jump to content

Saml1er

Retired Staff
  • Posts

    1,058
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Saml1er

  1. * sees your code magically and finds a solution for your problem* Sorry dude , can't help you like that. Please show us your code.
  2. Btw use pairs for loop since ipairs is 80% slower than pairs.
  3. Btw I made a custom dx gridlist. Looks nice and it's better than gui + easy to edit. You have to hold the scroll thumb and move the cursor. If you're having problems with gui grdlist then I can pm you my code and use dx grid list instead of gui. EDIT: onClientGUIClick is triggered when you click an gui element. onClientGUIClick returns 4 parameters. string button, string state, int absoluteX, int absoluteY
  4. Try this: function attachElementToBone(element,ped,bone,x,y,z,rx,ry,rz) if not (isElement(element) and isElement(ped)) then return false end if getElementType(ped) ~= "ped" and getElementType(ped) ~= "player" then return false end bone = tonumber(bone) if not bone or bone < 1 or bone > 20 then return false end x,y,z,rx,ry,rz = tonumber(x) or 0,tonumber(y) or 0,tonumber(z) or 0,tonumber(rx) or 0,tonumber(ry) or 0,tonumber(rz) or 0 attached_ped[element] = ped attached_bone[element] = bone setElementParent (element, ped) --- set it's parent and this function removeDataSentFlag() local elems = getElementChildren(source) for _ ,v in pairs ( elems ) do detachElementFromBone( v ) end data_sent[source] = nil end addEventHandler("onPlayerQuit",root,removeDataSentFlag)
  5. local theMarker = createMarker(1911.2722167969,-1776.7221679688, 13.3828125,"cylinder",2,0,255,255) addEventHandler( "onMarkerHit",theMarker, function (hitElement,mD) if getElementType ( hitElement ) == "player" and mD then if not isPedInVehicle (hitElement ) then return end local playerVehicle = getPedOccupiedVehicle(hitElement) fixVehicle(playerVehicle) end end) You're creating a new marker every 1 sec.
  6. local Elements = { } _dxCreateScreenSource = dxCreateScreenSource function dxCreateScreenSource (...) local a = _dxCreateScreenSource ( ... ) if a then Elements[#Elements+1] = a return a else return false end end _dxCreateShader = dxCreateShader -- copy the function for later use function dxCreateShader ( ... ) --rewrite it so when it's called we can use our copied function and insert the element into table local a = _dxCreateShader ( ... ) if a then Elements[#Elements+1] = a return a else return false end end local unLoad1 () for _,v in pairs ( Elements ) do if isElement ( v ) then destroyElement (v ) end end end You must also insert timers and event handlers into tables since they will keep running even if you nil the function you loaded using loadstring so it's better to unload them as well using killTimer and removeEventHandler.
  7. Use notepad ++ it's more easy and has good colors. Believe me that editor is optional. You can also add the extension made by JR10 to notepad ++ for mta functions. EDIT: viewtopic.php?f=91&t=76726
  8. I have an example from Xiti's work but I don't have permission to share it. You don't even understand the differnece between client and server side so something like this would be impossible for you.
  9. You are out of your mind. ._. MTA team doesn't speak urdu nor they can understand it if you write in urdu so for god sake stop inviting people to that crappy forum.. I'll ask MTA team to lock this topic if you don't stop inviting people. You're telling them to start chatting on that forum. If MTA team can read this then they can also go to that crappy site and read all the nonsense you wrote there. *facepalm*
  10. @Lampard: Nice job making so many topics in 2 days. Allah tumhe hiddayat dhe. Ameen.
  11. Then let's ask MTA team to close this forum for what we were waiting for so long. Dhusra fazool topic. :v
  12. @Bilal: I thought you left already? Anyway Idc but why are some of you are saying that he used google translator? I mean seriously, the words he wrote are purely from urdu. Learn to appreciate someone's work instead of reading the text 100500 times not to understand but to look for small mistakes.
  13. spam kerna bandh kero. Khuda ke wastay..
  14. Hmmm. I'll check it tomorrow if I can help. ;d
  15. Hello! You can join SolidGaming Server. Server: 134.255.231.125:2894 Site: www.solidgaming.net
  16. local sx,sy = guiGetScreenSize() showPlayerHudComponent ( "crosshair",false) function renderDisplay ( ) dxDrawImage ( 0.3*sx, 0.3*sy, 100, 240, 'arrow.png') end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), renderDisplay) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
  17. Yaar plz ye jagda chod dho ke mod rights kis ko milenege... Jithna jagda karoge uthna pito ge.
×
×
  • Create New...