Jump to content

xXMADEXx

Members
  • Posts

    2,718
  • Joined

  • Last visited

Everything posted by xXMADEXx

  1. Are you sure that's the correct IP and port? If you navigate to http://5.39.66.97:22063 the page doesn't load either. I got this error (In Chrome): ERR_CONNECTION_REFUSED
  2. When someone registers, loop through the table that getAccounts returns, then use getAccountSerial and compare the players serial to that. If they're the same, cancel the function and send an error. Here's an example: function _registerPlayer ( user, pass, player ) for _, account in pairs ( getAccounts ( ) ) do if ( getAccountSerial ( account ) == getPlayerSerial ( player ) ) then outputChatBox ( "An account with this serial already exists!", player, 255, 0, 0 ); return false; end end --- Complete the registration code here return true; end
  3. I don't have an account on the community, and i can't create a new one i don't know how its possible. Register here: https://community.multitheftauto.com/index.php?p=register
  4. Just login with an administrative account that is registered on the server.
  5. What do you mean the return isn't returning anything? INSERT statements aren't suppose to insert. If you want to get information from the database, use SELECT.
  6. The HTTP port could be changed, or you might need to re-add the user. What does the web-page print?
  7. Just change the access to false for general.adminpanel in acl.xml.
  8. For this, you need to use an export to the bone_attach resource.
  9. Create a table, and put their player element in the marker. Example: local enteredPlayers = { } local marker = createMarker ( 0, 0, 0, "cylinder", 3, 255, 0, 0, 120 ); addEventHandler ( "onMarkerHit", marker, function ( p ) if ( getElementType ( p ) ~= "player" ) then return end if ( enteredPlayers [ p ] ) then return outputChatBox ( "You've already entered the marker.", p ); end -- Rest of your code end );
  10. I don't know how you would get more accurate than exact...
  11. xXMADEXx

    Country chat

    No. The default admin resource that comes with the default MTA server has an exported function getPlayerCountry.
  12. Just get the position of the vehicle (getElementPosition) and add to the Z. Ex: local veh = createVehicle ( 411, 5, 353.56, 265.265 ); local x, y, z = getElementPosition ( veh ); z = z + 2;
  13. Are you sure that the WhoAttacksFirst function is being called? Also, check debugscript if you haven't already.
  14. Honestly, if you're a first-time scripter, this script wouldn't be a good one to start with. You would definitely have to know what you're doing to make it.
  15. xXMADEXx

    ml_bcrypt

    I know you posted this a few months ago... but here lol: https://mega.co.nz/#!QARAwLYY
  16. Thank you everyone. This is due because an Exception is being thrown. This is probably because either: - Your IP is wrong - Your port is wrong (Look for httpport setting in mtaserver.conf) - Your MTA server ports aren't open - Your http user may not have the correct permissions
  17. Wrong section. viewforum.php?f=177
  18. Look at the following location: hedit/server/utils.lua - Line 100
  19. Set the colorCoded argument to true. Link: dxDrawText
  20. You need to change the connection settings in NGSQL/meta.xml
  21. TUTORIAL/GUIDE NO LONGER MAINTAINED This tutorial is no longer maintained and it's contents may be deprecated or no longer work. I created this tutorial in 2014, when I was very involved with MTA and the community around it. Due to the nature of life, I ended up leaving MTA to focus on more important things (work, family, life, etc). I believe this tutorial has helped a lot of people get into scripting for MTA over the years, and I'm happy I was able to do answer questions and help people get into coding! Hello! Welcome to my MTA PHP SDK tutorial! In this tutorial I'm going to be teaching you guys how to call your MTA server from your web-server, and call your web-server from your mta server. This tutorial may require a small amount of prior PHP knowledge Let's get started! Getting your web server Getting & installing the PHP SDK Great! Now you're ready to actually get started with using the SDK. Setting up an HTTP user Connecting the servers Creating an HTTP responsive resource Calling our function from the web Getting data from mta server Thanks for viewing this. I will be updating the topic later to show how to call the SDK from the server, get inputs, and do returns later, when I get a chance. Please reply with any questions, concerns, or errors.
  22. Nothing we can do about it here.
  23. Check debugscript and post any relevant errors. /debugscript 3
  24. Do you mean something to change the team color from in-game?
×
×
  • Create New...