-
Posts
740 -
Joined
-
Days Won
16
Everything posted by Tails
-
Hello fellow MTA'ers, I've recently been having some issues while using "OMG'' and "RCG" causing the map to be erased/bugged so I was wondering if the warning below had something to do with it and/or how to fix it? Thanks in advance
-
Because I still want to be able to play them.
-
addEventHandler('onClientResourceStart', resourceRoot, function() txd = engineLoadTXD( "STOP.txd" ) col = engineLoadCOL( "STOP.col" ) dff = engineLoadDFF( "STOP.dff", 1234 ) engineImportTXD( txd, 1234 ) engineReplaceCOL( col, 1234 ) engineReplaceModel( dff, 1234 ) end ) Not engineReplaceTXD but engineImportTXD Try it
-
Nein, you don't understand what I need. I need it to cycle through custom selected maps. I don't want it to cycle through every map in the resources folder.
-
Look for the folders editor_test and editor_dump in server\mods\deathmatch\resources and delete them. Then write ''refresh'' in the console, open your map, and try again.
-
addEventHandler('onClientResourceStart', resourceRoot, function() txd = engineLoadTXD ( "vehicles/train.txd" ) engineImportTXD ( txd, 515) end ) <meta> <script src="train.lua" type="client" /> <file src="vehicles/train.txd" type="client"/> </meta> Change the path and file name in
-
Did /reconnect and I could still see the hangar, i can walk through it and fall into the ground.
-
You need to add File > Open As well as the possiblity to drag files over the the MTA script editor's window. Deleting doesn't work , only when text is selected.
-
Alright I did that the first time but it still doesn't remove all of it as you can see in the pictures.
-
Just tried to remove the hangar on the LV air strip. Managed to remove the physical object of it but for some reason it won't remove the high distance object, how do I do this? for i=16771,16773,16775 do removeWorldModel(i,10000,404.3408203125, 2476.5537109375, 24.884073257446,0) end
-
Hi I've posted a similar question before this, but I found out that there is a resource called 'mapcycler'. So I've added a few race maps to the mapcycle.xml file and removed the other ones. Then I included that resource to the 'race' game mode but it's still cycling through maps other than the ones in mapcycle.xml. Am I missing something? What am I doing wrong?
-
Try /sirens ingame.
-
Yeah, it's from a free public script, all I need is to activate it onClientMarkerHit.
-
Hello there again, What I have right now is a shooter script and an arrow named ''shootersarrow'' in my map. My question is: How do I make the following ''client'' script execute when a person drives through the arrow on my map? cLP = getLocalPlayer() screenWidth, screenHeight = guiGetScreenSize() function cRStest() setTimer(resourcesCheck, 10000, 1) end addEventHandler("onClientResourceStart", getRootElement(), cRStest) function resourcesCheck() if check=="done" then return else setTimer(cbinds, 1000, 1) textToggle=0 check="done" end end function cRS() if check=="done" then return else setTimer(cbinds, 3333, 1) textToggle=0 check="done" end end addEventHandler("onClientPlayerSpawn", getLocalPlayer(), cRS) function markers(player) if isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) fixVehicle(vehicle) end end addEventHandler("onClientMarkerHit", getResourceRootElement(getThisResource()), markers) function cbinds() local keys1 = getBoundKeys("vehicle_fire") local keys2 = getBoundKeys("vehicle_secondary_fire") if keys1 then for keyName, state in pairs(keys1) do bindKey(keyName, "down", cdoshoot) end bindKey("F", "down", cdoshoot) cbindsText = "- Press F or the button you use to fire to shoot rockets!\n- You can shoot once every 3 seconds.\n- good luck and have fun!." end if keys2 then for keyName, state in pairs(keys2) do bindKey(keyName, "down", cdoshoot) end end if (not keys1) and (not keys2) then bindKey("F", "down", cdoshoot) bindKey("lctrl", "down", cdoshoot) bindKey("rctrl", "down", cdoshoot) cbindsText = "- Press F or CTRL to shoot rockets!\n- You can shoot once every 3 seconds." end theVehicle = getPedOccupiedVehicle(cLP) allowShoots() bindKey("K", "down", toggleText) outputChatBox("#FF3366Press K to show/hide instructions", 255, 255, 255, true) end function toggleText() if textToggle==0 then addEventHandler("onClientRender", getRootElement(), bindsText) textToggle=1 elseif textToggle==1 then removeEventHandler("onClientRender", getRootElement(), bindsText) textToggle=0 end end function allowShoots() bindTrigger = 1 end function cdoshoot() if bindTrigger == 1 then if not isPlayerDead(cLP) then bindTrigger = 0 local x,y,z = getElementPosition(theVehicle) local rX,rY,rZ = getElementRotation(theVehicle) local x = x+4*math.cos(math.rad(rZ+90)) local y = y+4*math.sin(math.rad(rZ+90)) createProjectile(theVehicle, 19, x, y, z, 1.0, nil) setTimer(allowShoots, 3000, 1) end end end function bindsText() dxDrawText(cbindsText, screenWidth/15, screenHeight/2.5, screenWidth, screenHeight, tocolor(0, 149, 254, 255), 0.75, "bankgothic") end I'd appreciate it if you could help me with this Thank in advance
-
Thank you , I appreciate it! Although, I found it won't explode sometimes when the player isn't in the vehicle.
-
Okay but how do I fix that?
-
No, this is a script for freeroam, so if you someone drives their vehicle into the water I need it to explode so my respawn script can respawn it.
-
Hi there, function explodeVehiclesInWater ( ) local vehicles = getElementsByType ( "vehicle" ) for _, vehicle in ipairs ( vehicles ) do if isElementInWater( vehicle ) then setTimer ( function() blowVehicle( vehicle, true ) end, 10000, 1 ) end end end addEventHandler ( "onResourceStart", root, explodeVehiclesInWater ) If you read the script then you know I want. I need this script to explode vehicles when they go under water. Ofcourse it's not working so if anyone could take a look and tell me what's wrong with it I would appreciate it a lot! Thanks in advance
-
Nope ain't working, but this time no errors at all. Thanks for trying atleast Renkon!
-
What giving you the whole .lua file so you can take a look: http://www.datafilehost.com/codes.php function getRandomMapCompatibleWithGamemode( gamemode, oldestPercentage, minSpawnCount ) -- Get all relevant maps local compatibleMaps = exports.mapmanager:getMapsCompatibleWithGamemode( gamemode ) if #compatibleMaps == 0 then outputDebugString( 'getRandomMapCompatibleWithGamemode: No maps.', 1 ) return false end -- Sort maps by time since played local sortList = {} for i,map in ipairs(compatibleMaps) do sortList[i] = {} sortList[i].map = map sortList[i].lastTimePlayed = getMapLastTimePlayed( map ) end table.sort( sortList, function(a, b) return a.lastTimePlayed > b.lastTimePlayed end ) -- Use the bottom n% of maps as the initial selection pool local cutoff = #sortList - math.floor( #sortList * oldestPercentage / 100 ) outputDebug( 'RANDMAP', 'getRandomMapCompatibleWithGamemode' ) outputDebug( 'RANDMAP', '' .. ' minSpawns:' .. tostring( minSpawnCount ) .. ' nummaps:' .. tostring( #sortList ) .. ' cutoff:' .. tostring( cutoff ) .. ' poolsize:' .. tostring( #sortList - cutoff + 1 ) ) math.randomseed( getTickCount() % 50000 ) local fallbackMap while #sortList > 0 do -- Get random item from range local idx = math.random( cutoff, #sortList ) local map = sortList[idx].map if not minSpawnCount or minSpawnCount <= getMapSpawnPointCount( map ) then outputDebug( 'RANDMAP', '' .. ' ++ using map:' .. tostring( getResourceName( map ) ) .. ' spawns:' .. tostring( getMapSpawnPointCount( map ) ) .. ' age:' .. tostring( getRealTimeSeconds() - getMapLastTimePlayed( map ) ) ) return map end
-
startRandomMap failed. Are you sure nothing else needs to be modified? The piece of script above is from the race gamemode resource.
-
Add this epic tool: Multi Selection Tool for the mta editor. https://community.multitheftauto.com/ind ... ls&id=5785
-
Not working