-
Posts
1,461 -
Joined
-
Last visited
-
Days Won
34
Everything posted by DiSaMe
-
Or just set two more parameters, alignX and alignY, to "center" in dxDrawText.
-
I know. I thought of improving my gamemode, so there would be some point of playing it. But I decided there's no need to. Anyway, I'm going to make peds traffic in my gamemode, and it would use the similar way of pathfinding.
-
name="delux object" must be removed, moved to the end or you could change name to id.
-
Collision sphere cannot be created because chatRadius doesn't have a value. And in commands you get position of source, while the player element is stored in variable player.
-
Of course.
-
I don't want this to sound offending, but you seem a bit paranoic. MTA SA is an open source program, so everyone can see everything it does in the computer. I'm sometimes paranoic too, but not about MTA
-
That's my small gamemode with a killer who follows path nodes to find you. Pathfinding is the most important feature of the script. The only data synced by the script is killer's target element. Ped control states are set on each client individually. I had tried to make this mod on CLEO3 before, but pathfinding was the problem. CLEO4 has more features and that would be easier, but I don't work on it (I only tried it) because I think it would be better to show everyone in practice what is possible to do in MTA.
-
GTA SA object limit is 350. Is it unstable with that many objects, or what?
-
What's the point of merging? So that we would have a program with MTA features and 500 players limit? Increasing it in MTA would be more practical than merging two different programs.
-
First reason is program name. If you google "GTA SA multiplayer", it will show SA-MP in the first place because it's "San Andreas Multiplayer". Another reason is release date. SA-MP was released earlier than MTA SA DM (don't know what about MTA SA Race, but it has less freedom). Then most players got used to it and now they're afraid of moving. By the way, SA-MP being released earlier means less work and more bugs/less features When I look at feature suggestions topic in SA-MP forums, I see that almost anything players request is possible in MTA.
-
If you want to get length, width and height, use getElementBoundingBox.
-
Opening function uses airportgate, while the element is stored in airportgate2.
-
3D lines are drawn at the wrong position when a marker is on the screen. It's a bug.
-
You can't add a weapon in a way that GTA would understand it as a new weapon. But scripting lets you 'edit' the weapons. Let's say you want to change damage inflicted by a certain weapon. To do that, you can attach player damage event to a function that checks which weapon caused damage and set player's health to something else. With Lua you can even add new functionality, such as this:
-
You misunderstood me. By saying "streamer" I didn't mean "MTA built-in streamer", I was talking about my own script which loads and replaces models when you are near object and unloads/restores models when you are far. And to be more precise, I don't think there's something wrong with polycount. The map is Liberty City, converted from GTA3. I created programs to convert files myself , and they're not perfect. A few models crash the game, but when I use my custom model streamer, the game crashes more, so there's something unstable in MTA too, isn't there?
-
A map in my server has many objects with custom models. But loading the whole map gives me some problems. If I load and replace all textures and models when the resource starts client-side, SA loads very slow, so many objects (those of the original map) are invisible and the game freezes when I go to area with custom objects. If I only load and replace models, they're white, but everything else seems to work fine. I also tried to make a streamer which loads and replaces models and textures when the objects are near enough, but it's less stable - some objects lack textures, and it tends to crash client. I have also looked at gta_sa.exe memory usage via task manager. When MTA loads custom DFFs, COLs and TXDs, memory usage increases. But when a few thousands are loaded, it drops to a very low level, around 15000 KB. So I have two questions: how are those files handled, are they loaded into game when engineLoad*** functions are used, or is the game just directed to use custom files instead originals when object with that ID is created? And in which way (streaming or loading when resource starts) would you recommend me to use custom models?
-
0x7FFFFFFF seems to be the longest possible time. One game minute will take 25 real days, that should be enough
-
Or you can use tables: possible_values = {17,18,19,20,23,24,25} random_value = possible_values[math.random(#possible_values)]
-
What's wrong with that? Damage is done client-side. What the server gets is a result from syncer.
-
The only thing you found out on runcode is that setPedControlState is a clientside-only function. Yes, setPedControlState doesn't work on trains. It only works on peds. But engineer is a ped, not a train
-
Try this: Server: function createTrainAndEngineer() engineer=createPed(227,1479,2669,3) setElementID(engineer,"engineer") train=createVehicle(537,1479,2669,3) setTrainDerailable(train, false) warpPedIntoVehicle(engineer,train) end addEventHandler("onResourceStart",getResourceRootElement(),createTrainAndEngineer) Client: function driveTrain() engineer=getElementByID("engineer") setPedControlState(engineer,"accelerate",true) end addEventHandler("onClientResourceStart",getResourceRootElement(),driveTrain) As you can see, the server creates train and engineer when the resource has started, not when it's starting. Engineer element has ID "engineer" which is used by client to get the element.
-
I could decide myself if freeze checks are necessary or not for me, as sync isn't needed when the server is starting. However, I must agree that with coroutines I can do everything I need easily. Nice feature...
-
It means that source or SQLid has no value.
-
It must be sourceTable = {{}} instead of sourceTable = {}{}. However, only sourceTable[1] will be the table, other values will be nil as they aren't set to any value. So you need to set them yourself when the source is created. If the source is player, it can be like this: sourceTable = {} function playerJoined() sourceTable[source] = {} end addEventHandler("onPlayerJoin",getRootElement(),playerJoined) function playerLeft() sourceTable[source] = nil end addEventHandler("onPlayerQuit",getRootElement(),playerLeft)
-
You can open SA map with MEd and find the object.