Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. https://wiki.multitheftauto.com/wiki/Se ... kerEnabled
  2. Podes mandar la tabla directamente, y en el lado del servidor haces el loop.
  3. Castillo

    Help

    That hides all the nametag.
  4. Castillo

    A question

    You have to set the second argument of addEvent to 'true'. https://wiki.multitheftauto.com/wiki/AddEvent
  5. Castillo

    Help

    MTA nametags isn't part of a resource, you can hide it with the following function: setPlayerNametagShowing
  6. Castillo

    dxDrawLine

    No, you have to stop rendering it to no longer be visible.
  7. Castillo

    A question

    getPlayerFromName triggerServerEvent getPlayerAccount isGuestAccount getAccountData setAccountData
  8. What is the problem? /Global does nothing?
  9. Why don't you just use setElementParent? this way, if you delete the parent, the children will be deleted aswell, with no extra code.
  10. Castillo

    URGENTE

    Usa getTickCount, los timers no son eficientes, y menos en el lado del servidor.
  11. addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) local team = getElementData ( localPlayer, "team" ) if ( not team or not getTeamFromName ( team ) ) then local Aleatorio = math.random(1,3) if (Aleatorio == 1) then setCameraMatrix(2092.01, 1948, 14.051, 2080.36, 1900.86, 16.98) elseif(Aleatorio == 2) then setCameraMatrix( -1382.57, 680.96, 84.00, -1639.29, 746.37, 79.68) elseif(Aleatorio == 3) then setCameraMatrix(1574.7861328125, -1603.6557617188, 64.496025085449, 1436.1011962891, -1683.4934082031, 13.546875) end setTimer ( triggerEvent, 1000, 1, "spawnSystem:setSpawnVisible", localPlayer, true ) end for _, skin in ipairs ( getValidPedModels ( ) ) do skinsTable [ skin ] = true end end )
  12. De donde sacaste mi sistema de spawn? ese recurso no es publico.
  13. Remplazar 'ipairs' por 'pairs' no tiene sentido, tendria el mismo resultado, getElementsByType devuelve una tabla ordenada numericamente.
  14. ¿Donde esta definido 'a' y 'b'?
  15. Line 4, client side: elseif exports.global:hasItem(source, 85) then -- sirens There can't be 'elseif' without an 'if' first.
  16. Add the function to the end of your script and then use getTeamFromPartOfName instead of getTeamFromName.
  17. You can use this function: function getTeamFromPartOfName ( teamName ) if ( teamName and type ( teamName ) == "string" ) then local teamsFound = { } local teamFound = getTeamFromName ( teamName ) if ( teamFound ) then return teamFound end for _, team in ipairs ( getElementsByType ( "team" ) ) do if ( getTeamName ( team ):lower ( ):find ( teamName:lower ( ), 1, true ) ) then table.insert ( teamsFound, team ) end end if ( #teamsFound == 1 ) then return teamsFound [ 1 ] end end return false end
  18. https://wiki.multitheftauto.com/wiki/GetTeamFromName You can use that function to get a team from it's name.
  19. Castillo

    sound sync

    That's because: That even is only triggered for the local player, not everyone.
  20. Seems like the author never finished it, or never uploaded it anywhere. As you can see, the page is marked for deletion.
  21. Castillo

    sound sync

    Try changing 'localPlayer' from getElementModel to 'source'.
  22. Pasa o pasaba en mi servidor a menudo, lo que pude descubrir hasta ahora es que podria ser el recurso drive by el causante.
  23. Wiki says: Use in conjunction with getRealTime in order to retrieve detailed information.
  24. even if I separate into a group in the ACL? EX: if ( isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( "VIP" ) ) ) then setWeaponProperty(23, "pro", "maximum_clip_ammo", 600) else setWeaponProperty(23, "pro", "maximum_clip_ammo", 34) end This doesn't make any sense, can't you see that both would overwrite eachother?
×
×
  • Create New...