-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
@Markeloff Yea, that's because of that railroad track problem. I can't wait for those getTrainTrack() and setTrainTrack() features in 1.6, so I can fix it. But I have no idea how long it will last until the release. The trains are never been destroyed, they travel around the map like remote players do. But I chance this when those features in 1.6 come out, for now I keep it like this because when a train is created, it picks it's track. Once that happens, it can never be another track. So the script has to recreate trains until they pick the right one. Which will be checked by comparing the distance between the rail-road and the train itself. Thank you for your feedback!
- 28 replies
-
- trains
- not compiled
-
(and 2 more)
Tagged with:
-
Project trains This resource creates multiple trains driving around the map and make them drive automatic. It makes San Andreas a little bit more alive. You can set-up how much trains are created, how fast they go, minimal/maximal amount of trainscarts they are pulling and some more. Versions Version 1.0.0 Serverside time synced trains for multiplayer Admin panel settings Version 2.0.0 Uncompiled Better optimised than previous versions. CPU (3,5-3,9 GHz) 4 trains +/- 1.22% usage 40 trains +/- 7.05% usage Overkill Cleaned up a lot of the old code (I wrote this in 2015.. , never the less it is still ugly :C) Added some custom train-cart designs. Fixed all known bugs. Trains won't stop, even in this version. But you can try to make that yourself... Improved bandwidth You can design your own traincarts in the map editor, see documentation after clicking on the lazy download link Bugs: GTA spawn bug: Incorrect train spawn, see documentation. Repository Lazy <you> transport Armed to the teeth Admin panel settings Building your own traincarts with the map editor Download here - project trains 2.0.0
- 28 replies
-
- 9
-
-
- trains
- not compiled
-
(and 2 more)
Tagged with:
-
Something like this should do the job. Now memorize it, because I am not for requesting. Server local Music = { { "Hip Hop Radio", "http://mp3uplink.duplexfx.com:8054/listen.pls" }, { "Electo", "http://stream.electroradio.ch:26630/" }, { "Reggae", "http://184.107.197.154:8002" }, { "Rap", "http://173.245.71.186:80" }, } addEvent("onPlayerRequestingMusicData",true) addEventHandler("onPlayerRequestingMusicData",resourceRoot, function () if isElement(client) then triggerClientEvent(client,"onClientPlayerReceiveMusicData",resourceRoot,Music) end end) Client addEvent("onClientPlayerReceiveMusicData",true) addEventHandler("onClientPlayerReceiveMusicData",resourceRoot, function (Music) local row,col = guiGridListGetSelectedItem( grid ) if Music[row+1] and Music[row+1][2] then local sound = playSound3D (Music [row+1][2], x,y,z,true) if sound then setSoundVolume ( sound , 1 ) end end end) addEventHandler("onClientResourceStart",resourceRoot, function () triggerServerEvent("onPlayerRequestingMusicData",resourceRoot) end)
-
Just for the info. With the normal code on wiki, you will get problems with helicopters and planes that don't stop exploding.
-
https://wiki.multitheftauto.com/wiki/SetPedStat
-
No. Only an overwrite in lua might make it possible. Which is far from real bullets and afaik not even close to your lua skills.
-
Did you checked your debug? Because there were warnings, knowing just by looking at your code. local respawnTimers = {} function testRespawn(vehicle) respawnTimers[vehicle] = nil respawnVehicle(vehicle) end function getElementsOnExplode() if not respawnTimers[source] then respawnTimers[source] = setTimer ( testRespawn, 1000, 1,source ) end end addEventHandler("onVehicleExplode", root, getElementsOnExplode)
-
quality crappy if because he uses low resolution, but that effects if u make/or add crappy looking resources, too. I am talking about the code(dayz), not his screenshot. I am not that stupid... Quality code doesn't show errors or warnings.
-
So much work on a gamemode like that and such a crappy quality.
-
bool exports.object_preview:createObjectPreview(element object, float rotX rotY, rotZ, projPosX, projPosY, projSizeX, projSizeY [, bool isRelative = false, postGUI = false, [color=#FF0000]isSecRT = true][/color]) Set to true...
-
A resource is a container which can contain: scripts(Lua), maps files, xml files, etc. What does a resource minimal contain to be a resource? A folder which contains a meta.xml file. Some people call resources scripts too, which isn't a wrong definition when that resource is using scripts. Yet I keep those two apart, just to prevent misunderstandings.
-
Try this:(not tested) local myNumber = 23553.3546 local myText = tostring(myNumber) local myTable = split(myText,".") local myNumber,myDecimal = myTable[1],myTable[2] outputChatBox(myNumber) outputChatBox(myDecimal)
-
Attempt to arithmetic on local x1 ( a boolean value )
IIYAMA replied to stefutz101's topic in Scripting
x1 is defined, yet the function getScreenFromWorldPosition can't return correct values, because that position is behind your camera. Add line between line 2 and 3: if x1 then And of course add an end... end P.s: z1 is nothing. -
I don't know exactly what (Multiple Render Targets) are, but afaik that has nothing to do with rendering 2D MTA(dx functions) layers over each other. But if you have your visuals, it has to do with your or ren's code.
-
Did you test it without other gui's arround it? And yes your hardware/software must support it in order to use it.
-
These are the two factors that can change the render ordering between two onClientRender handlers. There is only 1 thing left, both are using the same event >"onClientRender"<? If they are, then you are mistaking somewhere else.
-
dxDrawRectangle(35, 24, 744, 551, tocolor(0, 0, 0, 236), [color=#FF0000]true[/color]) syntax dxDrawRectangle ( float startX, float startY, float width, float height [, int color = white, [color=#FF0000]bool postGUI = false[/color], bool subPixelPositioning = false ] ) dxDrawRectangle(35, 24, 744, 551, tocolor(0, 0, 0, 236), [color=#00BF00]false[/color])
-
onWeaponFire, you can't create custom weapons serverside yet, so forget it's existence. There is only onClientWeaponFire. If you want onWeaponFire to work, you have to make it a custom event.
-
Well, then I am sorry too. But that is how addEventHandlers work. You sure you aren't drawing anything over the GUI? Because if you set that optional argument to true, the dx will be drawing after the gui's have been drawn.
-
line 26 of the first code: end, true, "high+10") end, true, "low") Lower = later triggered = on top.
-
You can start by giving those variables an appropriate name. And as Noki said, add the content of the variable shadowDist to those messy named ones: l,t,r,b
-
because the variable "weapon" can contain only one number. And "and" mean AND and not OR. Put it exactly like this: if isElement ( attacker ) and (weapon == 30 or weapon == 22 or weapon == 28 or weapon == 29) -- between (), because it have to be 1 result. and getElementType(attacker) == "player" and getElementModel(source) == 165 then
-
Yea, you should have. You can't just leave an argument open. Last time it was using the bodypart as loss. addEventHandler("onClientPlayerDamage", localPlayer, function (attacker, weapon,bodypart, loss) -- source is the player that got damaged. if isElement ( attacker ) and weapon == 51 and getElementType(attacker) == "player" and getElementModel(source) == 165 then local oldHealth = getElementHealth(source) local newHealth = oldHealth + loss - 5 if newHealth > 0 then setElementHealth(source,newHealth ) cancelEvent() elseif oldHealth > 0 then setElementHealth(source,0) end end end)
