
Gamesnert
MTA Contributors-
Posts
2,035 -
Joined
-
Last visited
Everything posted by Gamesnert
-
Ehm... If you want it to be on your own website, you could use MySQL. There is a MTA/SA:MP querier for XFire... (game-monitor! ) For the rest: dunno... Btw, shouldn't this fit better in DM Server-side?
-
And if the parent isn't found, the tab will become a different window. Correct? Must be, since it was wrong for Cops and that one has an whole new window. Right?
-
They don't work together.
-
Unfortunately, there is no such even as "onElementMove" or "onElementRotate" or something... Neither are client-side versions, so we need to build it round the object stuff. Maybe you can do a table which you index with elements. So if you're standing on a box, it should have the index of the element you're standing on. Then you should save the object's current rotation with "getObjectRotation" and see if it has changed. If so, how much it has changed. Then, you should use "setPlayerRotation" and "getPlayerRotation" to set&get the rotation. (ofcourse setting the player rotation as the current rotation+object rotation) Hope that helps? @Ace_Gambit: Then you can try to do it every 2 frames? It might indeed be a bit dangerous for moving... But well, we can better test&try than just sit, wait and keep thinking if that's true... =/
-
Unable to download file is that error. This might be wrong configuration of your server/router/firewall. Is HTTPdownload parameter in mtaserver.conf set to 1? Is that error critical? Since errors happen in each gamemode, but do they make playing harder? If so, the creator should look at it. I don't really think the community can help at that point.
-
thx but it wont work SAMP have same problem.. In what way doesn't it work? You mean direct starting? Just do: mtasa://IP:PORT That should do it.
-
To be honest... In looking over about 6 times I didn't see what COULD be wrong... Or well, I couldn't see it for those 2 screens... I did see this: the coordinates for the window are 0,0? In the first screenshot, it more looks like 0.25 and 0.3... Probably not related, but I can't see any other trouble in createSelectWindow()...
-
Server list is broken for me too... If I press refresh twice, I get a message saying "Can't connect to the serverlist!" or something... Anyway, let me help you with the alternative I used ever since: http://www.game-monitor.com/search.php?game=mta NOTE: The serverlist also includes MTA:VC and MTA Race! But if you look at the map column, you'll usually see what are from what MTA version.
-
It needs to be in client side because all GUI's are client side.. it sets the ElementData at server side script.. i have an idea so ill try it.. thanks.. Eh..? No I meant DM Server-side section on the forums! Anyway, as I said: You need to be in a car on resource start. You just need another method... Because switching the car doesn't switch GUI right now... In fact, it's not updated at all...
-
Hmmm... I think this sould be in DM Server-Side? Anyway, I think that gVehicle is the problem. The player needs to be inside a vehicle on resource start. That may give trouble... Wouldn't it be better that you create the GUI first, and edit it later? Also, do getPlayerOccupiedVehicle in the analyseCMD function. For this reason you might want to remove "local engineSize=.." and place it somewhere else.
-
onPlayerDamage might be a good choice for the nightstick. You just have a function which puts him in jail, and add an event handler and command handler. The command handler needs to be protected, but hasObjectPermissionTo will help you there! It shouldn't be that hard to make a basic jail knowing this.
-
I don't think he wants to exactly rotate with the object... If you're getting on top of it at a direction of 90, and the object rotates, you'll stand in exactly the objects rotation... So in fact, it's true that you can do some things client-side, but you still have some problems... And is that synched?
-
Are you crazy That should not so healthy for a Server Lol did you look at the function name? It's called "lolz", you think I did that for nothing? Anyway, why is 50ms too laggy? I mean, sure framerate is shorter. But still 50ms gets executed bout 20 times... For as far as I know, the average person averagly sees 25 FPS. What would be wrong with the time? 5 frames delay in a full sec... By the way, can't you just use no rotation at all? They can use their gun and RP the rotation? ^^
-
I think that's one of the most difficult parts of scripting for MTA to be honest. It's not always that easy as triggerServerEvent or triggerClientEvent and you done... =/ Anyway, you got a point there... setTimer(lolz,50,1,...) then?
-
Why couldn't you use it on every frame... Ehm... onClientRender IS every frame?
-
Let me remind you of something I already told you. I'd suggest using onClientResourceStart, don't you think?
-
Sorry i forgot:D it gives me an error like "Bad argument @ line 26 "addEventHandler" " or something like that.. it doesn't give it in the console, it in the debug script. Ah ok! Anyway, improved version: function analyseGui ( ) analysegui = guiCreateWindow ( 0.3, 0.25, 0.4, 0.5, "Analysing results", true ) space1 = guiCreateGridList ( 0.015, 0.06, 0.483, 0.1, true, analysegui ) space2 = guiCreateGridList ( 0.512, 0.06, 0.483, 0.1, true, analysegui ) space3 = guiCreateGridList ( 0.015, 0.18, 0.483, 0.1, true, analysegui ) space4 = guiCreateGridList ( 0.512, 0.18, 0.483, 0.1, true, analysegui ) space5 = guiCreateGridList ( 0.015, 0.3, 0.985, 0.6, true, analysegui ) closeBTN = guiCreateButton ( 0.8, 0.92, 0.2, 0.098, "Close", true, analysegui ) addEventHandler ( "onClientGUIClick", closeBTN, onGuiClose, false ) guiSetVisible ( analysegui, false ) end addEventHandler( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ), analyseGui ) function analyseCMD ( thePlayer, commandName ) guiSetVisible ( analysegui, true ) showCursor ( true ) guiSetInputEnabled ( true ) end addCommandHandler ( "analyse", analyseCMD ) function onGuiClose ( ) showCursor ( false ) guiSetVisible ( analysegui, false ) guiSetInputEnabled ( false ) end What I did, and why: The addEventHandler is now inside analyseGui function. Reason? Everything outside any events is triggered/initiated before the ones inside events/functions. In other words, if you put for example: addEventHandler("onPlayerWasted",getRootElement(),playerRespawn) function playerRespawn() [..] end That won't work. The addEventHandler was executed BEFORE it knew what playerRespawn actually means. Get it? ^^ So even if the even is onClientResourceStart, the things outside of functions are ALWAYS triggered/initiated earlier! (or well, I don't know any exceptions... )
-
Just a thing: Isn't line 17 quite pointless? Isn't that like doing: if ( something==0 ) then if ( something==0 ) then ... end end Anyway, it's quite obvious why it doesn't work to be honest... It's only the problem that a lot of people forget it... (including me ) addEventHandler ( "onPlayerJoin", getRootElement (), setDataOnJoin ) 2 things: 1. This event doesn't exist client-side... Didn't you mean onClientPlayerJoin? 2. If the command WOULD be right, why using onClientPlayerJoin and getRootElement()? That would make it trigger for every player... Except for the player self... =/ (see onClientPlayerJoin)
-
Lol don't ask me bout trigonometry!! D: But would there be an alternate method? In theory, the only thing that could (possibly) be faster is getElementPosition client-side... But that's not always a good choise I guess... Would it work if you would attach it, and change offsets in some way while the object is moving? Not an expert in MTA yet, so I would like to know.
-
... What's wrong with it... I'm not going to copy it to find out, if you think I am. Give us some info.
-
All markers have a bit laggy movement, very annoying with a little script I had made... You would see a teammarker above your teammates heads, but it was also on your own head and lagged while walking... -.- Anyway, wouldn't setElementPosition(element,getElementPosition(theCarWhateverItsCalledBecauseIDontReallyCareBoutItsName)) be better? (if client-side, if server-side it might lag even more... )
-
If you use 127.0.0.1, that'd be a little weird that something outside of the local PC is the prob... =/ I guess there is just something else going on... Ehm... What IP do you use? Local IP, net IP or localhost? Note that 127.0.0.1 only works for your own PC.
-
Is the server started? Is the IP and Port correct? If it's the local PC, have you tried 127.0.0.1?
-
Linux Servers updated to be on the server list?
Gamesnert replied to OffRoader23's topic in DM Server-side
All Seeing Eye port: 22127 (UDP) Wrong, you're supposed to query the game port. I also remember having issues with GM, but it works now and it does update properly: http://www.game-monitor.com/mta_GameSer ... S.com.html is how it's supposed to look. Hmmm... After taking another look at the config, it seems that the ASE port is just serverport+123. No. Thought so. =/ -
Error parsing config file... Must be mtaserver.conf. I'll give you one: <config> <!-- This parameter specifies the name of the server, visible in the ingame server browser or in ASE. It's a required parameter. --> <servername></servername> <!-- This parameter specifies the IP address on which the server. It's useful for servers which have multiple IP addresses attached to them. If left blank, it will default to server's standard local IP. --> <serverip></serverip> <!-- This parameter specifies the Maximum Transmission Unit or maximum packet size that the server will use. This will depend on the nature of your clients, as well as the network medium your server is connected to. --> <mtusize>1264</mtusize> <!-- This parameter specifies the UDP port on which the server will be accepting incoming player connections; default value: 22003. It's a required parameter. --> <serverport>22004</serverport> <!-- This parameter specifies the number of maximum player slots available on the server; default value: 32. It's a required parameter. --> <maxplayers>32</maxplayers> <!-- This parameter specifies whether the builtin http server is going to be used. Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter. --> <httpserver>1</httpserver> <!-- This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It's a required parameter if <httpserver> is set to 1. --> <httpport>22005</httpport> <!-- This parameter specifies whether connecting players will be able to download needed resources for them from an external site rather than from the server. 0 - disabled , 1 - enabled; default value: 0. --> <httpdownload>1</httpdownload> <!-- If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Required parameter if <httpdownload> is set to 1. --> <httpdownloadurl></httpdownloadurl> <!-- This parameter can be used to make the server report to ASE master servers, allowing it to be visible in the ingame server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ). Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0. --> <ase>1</ase> <!-- If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them. --> <password></password> <!-- Specifies a location and name of the main server log file. If left blank, server won't be saving this file. --> <logfile>logs/server.log</logfile> <!-- This parameter specifies a location and name of the Access Control List settings file. If left blank, server will use acl.xml file. --> <acl>acl.xml</acl> <!-- Specifies a location and name of the debugscript log file. If left blank, server won't be saving this file. --> <scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <!-- Specifies a level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0. --> <scriptdebugloglevel>0</scriptdebugloglevel> <!-- Specifies a level of the html debug. Available values: 0, 1, 2, 3. When not set, defaults to 0. --> <htmldebuglevel>0</htmldebuglevel> <!-- Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter. --> <!-- <module>sample_win32.dll</module> --> <!-- <module>sample_linux.so</module> --> <!-- Specifies resources that are loaded when the server starts and/or which are protected from being stopped. To specify several resources, add more <resource> parameter(s). --> <resource src="admin" startup="1" protected="0"/> <resource src="helpmanager" startup="1" protected="0"/> <resource src="mapcycler" startup="0" protected="0"/> <resource src="mapmanager" startup="1" protected="0"/> <resource src="resourcebrowser" startup="1" protected="1" default="true"/> <resource src="resourcemanager" startup="1" protected="1"/> <resource src="scoreboard" startup="1" protected="0"/> <resource src="spawnmanager" startup="1" protected="0"/> <resource src="votemanager" startup="0" protected="0"/> <resource src="webadmin" startup="1" protected="0"/> <resource src="webmap" startup="1" protected="0"/> </config> Put that in: MTA install folder>server>mods>deathmatch>mtaserver.conf It might also be the ACL, but I guess it shows that it couldn't parse ACL in that case. Anyway: Some hints: -Fill in a name between and -Leave serverIP empty -If you want a public server, leave ASE to 1. Otherwise, set it to 0. -If there are any resources you want to start at serverstart, do it in the list at the bottom in the same way as the others. But I'd suggest trying without editing first.