-
Posts
1,131 -
Joined
-
Last visited
-
Days Won
2
Everything posted by MIKI785
-
guiGridListGetItemText's arguments are the gridlist, the row ID and the column ID (they start at 1), so you can just supply those numbers without getting them from guiGridListGetSelectedItem. But if you want to get the text of an item the player clicked on (selected) then you have to use that function.
-
@MR.NaiF-MTA i don't understand what is that supposed to solve, why use a timer? onClientResourceStart gets always triggered after all the files are downloaded (even the scripts get loaded afterwards). It's strange that it doesn't work, try removing the 44 in engineLoadDFF, that function actually takes only one argument (the DFF file) but it shouldn't matter in Lua.
-
This isn't the way to ask for help in this section. The correct way is to post a code snippet, tell us what's wrong, what it should do, errors/warnings from debug etc.. and we then tell you how to fix it/make it do what you want.
-
That means that your connection was refused by a script on the server (onPlayerConnect cancelled), so you should ask the server owner what is causing this. Edit: you say that you can play on the server for several minutes? Then i might be wrong, i don't think it's possible to disconnect like this once you join the game.
-
Well the solution is to open the port. How? Depends on your OS, try googling it.
-
Rotation offset is not the same as rotation. Offset specifies the X, Y, and Z points that the element should rotate around (like the center of the element). Did you even try using setElementRotation?
-
To be honest i don't know what is the issue there. Try doing a debug in your loop, something like this: for i, m in ipairs(xmlNodeGetChildren(banlist)) do outputChatBox(tostring(i) .. ": " .. tostring(m)) And give us the output.
- 8 replies
-
- multigamemode
- console error
-
(and 2 more)
Tagged with:
-
You should mark the lines with the warnings for us, since the numbers are different here. Anyway, on lines 37 and 48 settings is nil. I guess it's nil because you used xmlUnloadFile previously and didn't load it again. Also, local exists = fileExists ( "vehicles/bandito.txd" and "vehicles/bandito.dff" ) is wrong. That will only check for the second file, that is the dff. You have to use it like this: local exists = fileExists("vehicles/bandito.txd") and fileExists("vehicles/bandito.dff")
-
You are changing the offsets and not the rotation itself. Use setElementRotation instead of setElementAttachedOffsets. Also using triggerServerEvent in onClientRender isn't really wise. There's no need to change the rotation server sided since you're using vehicle component rotations, so it could be done client sided and every player would see the same thing.
-
You could at least mark those lines for us (n. 214 and 248). I think that the issue is that in the first code 'model' is not defined and in the second one 'gear' is not defined. They're simply nil and you are trying to index a table with them resulting in that error.
-
console Is there a way to Force a player to disconnect or quit?
MIKI785 replied to Lord Henry's topic in Scripting
The reason why you can't use disconnect or quit with aexec is that those are client commands. Not meaning that they are client-sided but that they are in the client itself and can be used even without being connected to any server. Same applies for connect, reconnect, screenshot and so on. The only way to make player disconnect is to kick them, kickPlayer has a responsiblePlayer argument that can be a string, so you can put in anything you want to make the kick 'anonymous'. Can't think of any other way, sure you could try to crash the player's game but MTA is too good for that, at least I'm not familiar with any way of crashing the client's game. @01010011 i don't think that's gonna make the client 'explode', infinite loops get detected and terminated automatically. -
Make the default radar bigger? I don't think that's possible. You'd have to make your own radar in Lua. All you can do with the default one is to show/hide it and to change its textures, that's it I think.
-
I don't quite understand but i guess you're using 'refreshall' and you get 'Network Trouble' shown. That's normal behavior when the server has lots of resources, because it has to go through every one of them. That's usually a problem if you have a lot of maps (100s or even 1000s), the server is busy and is not answering to players, thus you get 'Network Trouble'. The only way to get around this is to use 'refresh' command instead of 'refreshall', that just loads new resources that might have been added.
-
You're missing the very basic thing: actually giving players those XPs. I mean, you have playerTP variable and you just change that in givePlayerTP, it doesn't make sense. It means that all the players will share the same value since it's on serverside. The best way to do this would be to use setElementData, so you can easily change it both server and client side and not worry about syncing it.
-
Well it's very simple. If you want to warp a player into a vehicle then you have to create it and warp the player in it on the server side. There's no other way. It might be unnecessary for the vehicle to exist server side but so what? It won't affect the server in any way (well it does but it's negligible). If you really don't want others to see the vehicle, use setElementVisibleTo. <-- That actually doesn't work with vehicles.
- 8 replies
-
- warppedintovehicle
- player
-
(and 1 more)
Tagged with:
-
This can already be done. Just make your own GUI system with dx.
-
Did you mean ver? If so: v1.5.2-release-9928
-
It looks nice but it seems to have less options for us users. For instance I'm not able to find an option to change date format, like I seriously wasn't born on the 21st month of the year 1997. Also, time... i want my 24 hour format back!
- 84 replies
-
- mtasa
- forum stuff
-
(and 5 more)
Tagged with:
-
The screenshot speaks for itself: It is an issue on MTA's side.
-
https://nightly.multitheftauto.com/files/luac_mta.exe
-
They are client commands, you can't disable those.
-
You say that there are no errors, do you mean just errors? Because if there was an issue with permissions it would throw a warning saying that access was denied. It would also throw a warning if 'plr' variable wasn't a player. It has to output something, use debugscript 3. Also, the outputChatBox should throw an error, because 'plr' is either a player element (if the player was found by getPlayerFromName) or false. In both cases it would be an error if you don't use tostring.