Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. local ammoData, weapID = getWeaponAmmoType(weaponName) if getElementData(source, ammoData) <= 0 then -- Aca salta el error Despues de getWeaponAmmoType ponele esto: outputChatBox ( tostring ( weaponName ) .."; ".. tostring ( ammoData ) )
  2. Debe ser que "getWeaponAmmoType" esta devolviendo 'nil' o 'false'.
  3. Castillo

    Admin system

    We don't give support with leaked scripts.
  4. What you have to do is create your own ban system, instead of using the MTA ban system, you use a custom one.
  5. He's not asking to lock them as lock in the doors, I think he means that it doesn't let you drive it if you ain't of that class.
  6. Show me the dxDrawGifImage script you're using.
  7. No, it uses sprites ( separate image files ).
  8. Yes, there is: getPedArmor
  9. Maybe they'll add .gif image support for their own GUI in MTA 2.0.
  10. I think he wanted to remove ped from Vehicle. here -- function leaveVehicle (thePlayer) local vehicle = getPedOccupiedVehicle(thePlayer) if vehicle and isElement(vehicle) and not isPlayerRaceDead(thePlayer) then outputChatBox(getPlayerName(thePlayer).." is out from vehicle ) removePedFromVehicle ( thePlayer ) end end addCommandHandler("eject", leaveVehicle) I wasn't posting a solution, I was showing him what was causing the warping-back-to-vehicle problem.
  11. ------------------------ -- Keep players in vehicles g_checkPedIndex = 0 TimerManager.createTimerFor("raceresource","warppeds"):setTimer( function () -- Make sure all players are in a vehicle local maxCheck = 6 -- Max number to check per call local maxWarp = 3 -- Max number to warp per call local warped = 0 for checked = 0, #g_Players - 1 do if checked >= maxCheck or warped >= maxWarp then break end g_checkPedIndex = g_checkPedIndex + 1 if g_checkPedIndex > #g_Players then g_checkPedIndex = 1 end local player = g_Players[g_checkPedIndex] if not getPedOccupiedVehicle(player) then local vehicle = g_Vehicles[player] if vehicle and isElement(vehicle) and not isPlayerRaceDead(player) then outputDebugString( "Warping player into vehicle for " .. tostring(getPlayerName(player)) ) warpPedIntoVehicle( player, vehicle ) warped = warped + 1 end end end end, 50,0 ) That's the code that warps the players back into their vehicles, is inside "race/race_server.lua".
  12. function savePass ( ) local xmlFile = xmlLoadFile ( xmlFileName ) local pass = ( guiCheckBoxGetSelected ( PasswordSave ) and tostring ( guiGetText ( editPassword ) ) or "" ) xmlNodeSetAttribute ( xmlFile, "password", pass ) xmlSaveFile ( xmlFile ) xmlUnloadFile ( xmlFile ) end Try that one.
  13. Can you post the parts where it executes it?
  14. That's just a comment, that script is ready to work, all you have to do is copy the script to a .lua file, change "mySoundFile.mp3" to your file name, and add the recently created .lua to the meta.xml of your map, like this:
  15. addEventHandler ( "onClientResourceStart", resourceRoot, -- Attach a 'onClientResourceStart' event to the function. function ( ) -- Define the function. playSound ( "mySoundFile.mp3" ) -- Play a sound file. end -- End the function. )
  16. When are you executing: "xmlFileHandler"?
  17. On which function is the stack overflow appearing?
  18. If you are on the map editor, then it must be the freeroam, and no, it won't show on the actual server, unless you start "freeroam" resource, obviously.
  19. These functions work for both files and live stream URLs, is really not hard, you just gotta give it a try.
  20. Basically, you need the following: playSound And if you want to make a command to stop it: addCommandHandler stopSound
  21. That's because the script is client side.
×
×
  • Create New...