Jump to content

Motar2k

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by Motar2k

  1. ~= means different from if is a condition if player ~= localPlayer then means If the player is different from localPlayer If you need help, don't hesitate to send me a message
  2. @Artyom888 for i, player in ipairs(getElementsByType("player")) do --player - localPlayer if player ~= localPlayer then table.insert(playersList, player) end end
  3. So that problem doesn't have to happen. Try changing the name of the variables and change the size of marker or add more Z position, Apparently it does not detect the collision
  4. @hackermagus You have other function called MarketHit?
  5. Surely the dimension is not the same, Also use setElementDimension
  6. You need to declare the table in which you will store the data. interiors = {}
  7. @slapz0r Check this https://community.multitheftauto.com/index.php?p=resources&s=details&id=11231
  8. https://community.multitheftauto.com/?p=resources&s=details&id=16529 Text animation Point animation Wordrap
  9. I don't see any errors. Try this setElementRotation(NCP,0,0,rotZ+10)
  10. local NPC = createPed(124,0,0,5) local screenWidth, screenHeight = guiGetScreenSize() local range = 15 function NPCnametag() local x,y,z = getPedBonePosition(NPC,6) local px,py,pz = getElementPosition(localPlayer) if getDistanceBetweenPoints3D(x,y,z,px,py,pz) <= range then local sx,sy = getScreenFromWorldPosition(x,y,z) if sx then dxDrawText("Bob",sx,sy,sx,sy,tocolor ( 255, 255, 0, 255 ), 2,"sans") end end end function HandleTheRendering() addEventHandler("onClientRender",getRootElement(), NPCnametag) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
  11. Try this local NPC = createPed(124,0,0,5) local screenWidth, screenHeight = guiGetScreenSize() function NPCnametag() local x,y,z = getPedBonePosition(NPC,6) local sx,sy = getScreenFromWorldPosition(x,y,z) if sx then dxDrawText("Bob",sx,sy,sx,sy,tocolor ( 255, 255, 0, 255 ), 2,"sans") end end function HandleTheRendering() addEventHandler("onClientRender",getRootElement(), NPCnametag) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
  12. @djantony Muchos de los robos son creados por diferentes personas, por lo tanto las estructuras de estos resources suelen ser diferentes. Antes de crear un sistema de robo te recomiendo hacer sistemas mas básicos para ir desarrollando tus habilidades como scripter, si gustas mandarme un mensaje privado para ayudarte. Mi discord: Armisael_#1719
  13. @David_Roa Buen aporte, solo que debes publicarle en la sección de Recursos y aportes
  14. setTimer( function() SortPlayerVehiclesID(thePlayer) end, 7000, 1) else outputChatBox("#ff0000Shoma Dar Hale Hazer "..tostring(getElementData(root,"carsnumber")).." Mashin Darid!", root, 255, 255, 255, true) setElementData(root,"carsnumber",nil) end else outputChatBox("#ff0000Shoma Poole Kafi Nadarid!", root, 255, 255, 255, true) end end
  15. Use this before line 359 if tonumber(getElementData(root,"carsnumber")) and tonumber(getElementData(accSys:getPlayerAcc(root), "pSlot")) then This verifies if the 2 values to compare are numbers
  16. The bug occurs when logging in or disconnecting? @DiGiTal
  17. function getFrontPosition(element,dist) local x, y, z = getElementPosition(element) local _,_,r = getElementRotation(element) local tx = x + - ( dist ) * math.sin( math.rad( r ) ) local ty = y + dist * math.cos( math.rad( r ) ) local tz = z return tx,ty,tz end
  18. I didn't see anything abnormal in the code, you probably got confused with the name of the data in some other resource. Traslated by google
  19. It's possible get the firetruck vehicle turret target?
  20. are you doing in relative position and size?
×
×
  • Create New...