
AcidbRain
Members-
Posts
45 -
Joined
-
Last visited
Everything posted by AcidbRain
-
Yes, you should use mmove.exe on your Race maps, in order to set them within a 8192 radius from the center, and after that you can convert them into MTA1.0 format.
-
Most certainly, your 'Wanken Orly.map' file can't be parsed as valid xml. Check that file for typos. ETA: Your meta.xml isn't valid xml either, since lines like this one: <setting name="#skins" value="[ "random" ]" /> should look like: <setting name="#skins" value='[ "random" ]' />
-
Maps that are set too far away from the coordinate center will have this problem after conversion. To avoid this problem, make sure that coordinate values are each less than 8192 before converting them.
-
It also happens when editing race maps. ETA: There is a way to tell when this glitch happens, when after saving the map you don't see the message " has saved the map.". If you try to load another map afterwards, the object browser will appear empty, from which point you know it's time to check your .map files.
-
This is likely to occur when you use the editor for a prolonged time span. Keep your backups safe, and if possible, use a vcs on your resources.
-
No one insulted MSD. The only thing said was that we don't need more noob dinghy falling maps. And we don't need them because they're stupid and suck.
-
You spoil us with these great circuit races, it's truly awesome work.
-
No, not just you. What I've noticed is that click events invariably stop working on the admin panel (either connected to local server and remote servers). This only happens some time after being connected. Disconnecting and reconnecting to the server seems to fix the problem, but only temporarily.
-
On race resource maps, calling createVehicle will always create non-collidable vehicles, even if the race ghost-mode setting is disabled. Is there any way to create collidable vehicles in this context – other than calling setElementCollidableWith on each client's frame render?
-
Since you use 'class' as a global variable, it will retain the value from the last user that has joined. What you should probably do is to associate the 'class' to a player, either using a global table or using the player's element data.
-
I'm trying to determine whether a resource function is exported or not. Unfortunately, calling type(exports["resourcename"].functionNotExported) will return "function" even when functionNotExported isn't marked as exportable in meta.xml. Of course I could issue a pcall, but that is not the ideal solution. Is there any other way to know if a function has been exported?
-
Beware that the 'race rank' data is updated at 1 second intervals, so if you really need accuracy you'll have to wait at most 1 second after the player has finished.
-
Taking an example from the getplayerspeed resource: if (mode == "MPH" or mode == 1) then return math.floor(getDistanceBetweenPoints3D(0,0,0,getElementVelocity(vehicle)) * 100) end if (mode == "KMH" or mode == 2) then return math.floor(getDistanceBetweenPoints3D(0,0,0,getElementVelocity(vehicle)) * 100 * 1.61) end This code assumes that the output of the getElementVelocity function is in miles per hour (or more precisely, in hundred miles per hour). Why should the function output in mph while the unit system is metric, is a question left to the games developers.
-
Those two files weren't supposed to be added to the race_mapratings resource, but to be on a separate resource. The table output was due to a mistake, since the 'mapRating' variable actually has three fields: average, color, and count; what you want is the average. You should also check that it holds any value.
-
This should do the trick: Server local g_Root = getRootElement() -- defined in race_mapratings resource addEvent("onSendMapRating") addEventHandler("onSendMapRating", g_Root, function(mapRating) -- relay map rating to clients triggerClientEvent("onClientAcquireMapRating", g_Root, mapRating) end ) Client local g_Root = getRootElement() addEvent("onClientAcquireMapRating", true) addEventHandler("onClientAcquireMapRating", g_Root, function(mapRating) if mapRating then outputChatBox("This map is rated: "..tostring(mapRating.average).."/10") end end ) This is the simplest example; you can replace the outputChatBox with a more elaborate GUI output. Edit: mistake
-
I have a race map resource to which I have attached a small script running client-side. Is there a way to access the race checkpoint table from there?
-
I have a race addon which I want to be configurable from the admin panel. In the meta.xml file I have: ... <settings> <setting name="*MySetting" value="true" accept="true/false" desc="Setting description" /> </settings> ... When I view the addon settings in the admin panel, it will initially show the MySetting entry. However, if I change its value, the admin panel will instead create a new entry named .MySetting, while leaving the original MySetting entry unchanged. It's odd, because I can change settings in other resources (for example, race) without this happening. What am I doing wrong? PS: I'm using rev. 453
-
Not exactly what I was hoping for, but that's a great idea nonetheless.
-
I have this piece of code running client-side: local x, y, z = getElementPosition(getLocalPlayer()) local boulder = createObject(1303, x, y, z + 10) setElementVelocity(boulder, 0.0, 0.0, -0.1) The fact is that the spawned boulder doesn't fall to the ground, even with my attempt to nudge it with setElementVelocity (which, by the way, returns true). What else can I do?