Jump to content

Ace_Gambit

Members
  • Posts

    569
  • Joined

  • Last visited

Everything posted by Ace_Gambit

  1. It really isn't that hard. All you have to do is tell MTA the exported server function is accepting HTTP requests and use any language of your taste that supports HTTP requests. AJAX for example has the XMLHttpRequest object but you can also use sockets in C++. I know MTA DM has HTTP interface classes that you can use (PHP and AJAX). Just search the wiki or look at this very basic example. HTTPExample.lua function getServerPortEx() return getServerPort() end meta.xml <meta> <export function="getServerPortEx" http="true" /> </meta> HTTPExample.js var xhr = false; try { xhr = new XMLHttpRequest(); } catch (e) { try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Foo"); } } } xhr.onreadystatechange = function () { if (xhr.readyState == 4) { try { alert("Server Port: " + xhr.responseText); } catch (err) { } } } function getServerPort() { xhr.open("POST", "http://localhost:[port]/[resource]/call/getServerPortEx", true, "user", "pass"); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.send(null); } index.html <html> <head> <script src="./HTTPExample.js" type="text/javascript"></script> </head> <body> <button onclick="getServerPort(); return false;">Get Server Port</button> </body> </html>
  2. I wouldn't use the setElementPosition function at all. Instead calculate the new position, rotate the player towards that position and make it walk to that position (DP3). That way the player is not blocked in its movement.
  3. Trigonometry is not the problem. You can solve this problem with maths (calculating the right position and rotation that is). What you can't solve is the fact that you can't move when you update the players' position every frame. I am not trying to demoralize anyone, but I personally think it can't be done with the current GTA or MTA physics. But feel free to prove me wrong.
  4. It's not that. Besides, JPEG does not support transparency. When I was working in OGRE3D transparent PNG's had the same "white border" problem. And it seems to be known in other graphics engines as well. I did some research but never really found the solution. Some said it was due to the fact that Photoshop does not save the alpha channel. But the problem remained even after I saved the image as bitmap with alpha channel and converted it to PNG-24 (Photoshop defaults to PNG-8 red.). EDIT: typo, meant to say "does not save the alpha channel" instead of "does save" .
  5. The big question is, how are you planning to make players freely walk around while remaining on the moving object?
  6. Also, logging in as administrator and setting debug script to level 3 helps tracing errors yourself.
  7. If you don't want people to login using the MTA command just add the following rule to the ACL. <acl name="Default"> ... <right name="command.login" access="false"/> ... </acl> This will restrict all users from accessing that particular command.
  8. This has indeed been reported on several occasions and I've personally seen it in action. I couldn't figure out what's causing it but I suspect it to be an ordinary bug.
  9. Try to export the collision file separately instead of appending it to the model file. Works for me. I did not import CS models to MTA but GT3 models. But it shouldn't make any difference once you export it from 3DS for example.
  10. LOL. You are trying to say that there was no client script support prior to DP2 ? I wouldn't know because I came back from my internship and found out the DP version was up 2 already .
  11. Ace_Gambit

    Compare: SA-MP & MTA

    Sorry, but that was me talking about sa:mp and not mta of course .
  12. Ace_Gambit

    Compare: SA-MP & MTA

    I see it all the time. What is even more annoying when someone actually makes your car burst into flames until it explodes, gets into the vehicle and drives away, like wtf?! Or when you chase some noob runner to the end of the world and he escapes by getting in a vehicle that isn't on your screen. That really pisses me off.
  13. I am not sure what you are trying to say. But setting the velocity is like a pulse. You will have to repeat it if you want continuous velocity changes in a certain direction.
  14. This will be possible through scripting in DP3. Adding default commands would only make this mod look like that other mod where everything is done for you.
  15. But the essential difference is that accessing the registry is slightly harder than deleting files from the resource cache. You will have to bare in mind that you can't write files outside of the MTA resource root folder. This makes it even easier to track "lock" files. This could still work though, storing files on the client that is. As long as it is validated by the server.
  16. That will probably get the job done. But banning players by putting a file on their system (???) doesn't make any sense. It's like locking someone inside but putting the key in one of his pockets.
  17. Every file you create is visible. MTA can't alter file flags. But there's no real need to hide files unless it's a shared workstation imo.
  18. My best guess is that you are trying to replace objects in the GTA world (objects that are part of the original map). That isn't going to work. You can't replace original map objects like in SP.
  19. Try to search for "MEd gta" in Google. This is a very handy tool that allows you to move freely through the GTA world and select objects (get ID's).
  20. I am not sure what you want to use it for but here's an early build of the MTA-Services module I am working on. It is a stripped version of the one I am distributed as part of a game mode because that one also includes MSN echo, RSS feed parser, Google search (lightweight), regular expression support and other helpful server services. But I don't want to release those yet so you can just play around with the early alpha build which only includes the SMTP service instead . function test() if (smtp_connect("smtp.host.com")) then print("Connected to SMTP server.") smtp_sender("Sender name", "[email protected]") smtp_receiver("First receiver name", "[email protected]") smtp_receiver("Second receiver name", "[email protected]") smtp_receiver("Third receiver name", "[email protected]") smtp_subject("MTA-Services module test") smtp_body("Just testing the SMTP service =)") if (smtp_send()) then print("Message send.") else print("Can not send message.") end else print("Can not connect to SMTP server.") end end addCommandHandler("test", test, false)
  21. I do recall an oddity when you create GUI elements before onClientResourceStart is triggered. Try to create the GUI labels inside onClientResourceStart and let me know if it makes any difference.
  22. I have no problems using that function. Post the entire code snippet that throws the error.
  23. Hi, I just want to say your game mode looks really cool. Keep up the good work.
×
×
  • Create New...