Jump to content

sparx

Members
  • Posts

    35
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by sparx

  1. I think to push direct connections from the launcher, i.e. using direct protocol to launch RageMP and connect (rage://v/connect?ip=<Your IP>) requires some approvals/whitelisting from the leads, or it was never officially supported. Next best suggestion is to have a separate whitelist on your server to confirm a user has "launched" / "authenticated" from your custom launcher before allowing them on the server.
  2. sparx

    RP servers

    Have a look here - https://rage.mp/forums/forum/39-server-advertisements/ There are a few in development spread across the GTA SA map and a map set in Liberty City.
  3. Wrap the function in event on the client-side, and simply call that event server-side when you want to activate it. I use Typescript/JavaScript but have a look at how to call client-side events in C# via https://wiki.gtanet.work/index.php?title=TriggerClientEvent
  4. Here you go!
  5. And does this occur on every server or just one? Can you log into a few different servers and try that?
  6. Here's to the most fun non-roleplay server out there 🍻
  7. I'm not sure of any Rage bug that moves someones mouse, that's usually handled by the OS so it's definitely a hardware issue. Does the mouse move on it's own in your browser / desktop or is it only when you try and log into a server? Test it here to see if your mouse is giving any input when you hold it still: https://www.vsynctester.com/testing/mouse.html
  8. I like the look of this, brings back memories from LS:RP and seems like a fun alternative to GTA V LS. Good luck!
  9. Use mp.keys.bind as listed here: https://wiki.rage.mp/index.php?title=Key::bind It also has a good example of calling a server-side event, where you can handle the locking and unlocking of a vehicle. Alternatively, if you're going sole c# there's a few scripts on the resources list that help.
  10. You can use CEF / IFrames to embed video directly into the browser. I'm not entirely sure if you can utilize Action Recordings in RageMP like you would on normal GTA V Multiplayer. But there are some natives that you can play about with. See: https://cdn.rage.mp/public/natives/#native_0xC3AC2FFF9612AC81 Best bet is to let them paste a youtube/imgur link for whatever they have recorded and embed that into an iFrame for your in-game social networking app.
  11. Good question. I prefer to follow a micro-service architecture for most things I build. Practice loose coupling everywhere to minimize one component being too reliant on another. To be fair, if the bot is just completing tasks for the server, and that's it (posting to discord channels with logs, relaying messages etc) then it'll be fine to couple it to a server. Personal preference I guess
  12. I have a standalone discord bot written in .NET and it uses an API to retrieve game-server information. My server exports data to an endpoint in JSON, then I use the bot to scan for updates to the game-server API endpoint via a request. This scan can either be timed or manually triggered. The bot hits the custom endpoint, authenticates with a header bearer, and uses the information to update player count etc on the bots active game. If you are able to build your bot directly into your game-server, then that may be another route to go down.
  13. sparx

    Command cooldowns

    The best option will likely be to store the timestamp (Ideally UNIX Timestamps) of when the player issued the command, and calculate that against your cooldown amount for the specific command. Player issues the command for /heal - UNIX timestamp saved (1630347503) Command structure allocates a 10 second cooldown for the /heal command. User issues the command again - Check current UNIX timestamp (1630347717) and minus against the saved time (1630347503) 214 is the result which is > than 10 seconds, allow command execution. You could also potentially mess with timers, but having X amount of timers running simultaneously for X amount of players with X amount of commands can add a lot of bloat. Mathematical calculations are much faster. There are of course so many other ways you can do this, but this'll likely be the most simple to implement. Another point is, you don't always have to use UNIX. There are many DateTime calculators out there for C# if you wish to use those. You can also use co-routines in C#, but then again questions on performance needs to be weighed out.
  14. I thought this was a SAMP bug 😅 Do a simple (or more complicated) server-side check, if the player enters a vehicle when the lockstate is true / speed is > x, kick them out. Not sure if the original issue could be down to their network connection.
  15. If your hosting your server locally on your own PC, you'll need to port-forward and complete a bunch of networking tasks in order to receive and handle non-local connections. There's many guides on port-forwarding. If you have a dedicated host, such as a VPS or Dedicated Server, this should already be set for you. Ensure you're allowing the server ports / server.exe process through the firewall of your service provider. Would ideally need more information on their connection errors in order to solve it.
  16. Sorry if I'm not reading into this carefully but, If you don't want localplayer to have a blip, simply check for mp.players.local == entity in any form of DataHandler / Render for your client-side blips. My general solution to handle joint server/client side blips is: If player is in local streaming distance, set blip client-side. Do mp.players.local check on a custom data handler to display accurate, directional blips for streamed in players. Once a player streams out, hand the job to the server, updating all blips every X seconds To be fair, the solution I've implemented required a lot of playing back and forth and doing checks to get working. There is likely a more appropriate way. My best guess is to use a combination of the above. Handle it client-side first, and only apply server-side blips to those out of streaming range of the local player (note that these blips will not be directional). Please ask more questions though so I can look into it more specifically!
  17. This (i assume) will be your main setter for vehicle visual damage: https://cdn.rage.mp/public/natives/#native_0xA1DD317EA8FD4F29 potentially paired with: https://cdn.rage.mp/public/natives/#native_0x4EC6CFBC7B2E9536 But I'm not sure if there is any proper getters relating to the first native, I'd probably save some vital stats of the vehicle through other natives and just generically (or randomly) apply damage based on those calculations . I've never wrote a script that handled visual damage before, but that's where I'd start. I'd learn those natives and try and find use cases for them and/or build a more generic system around it.
  18. You can invoke a lot of "getVehicle..." natives that control the state of the vehicle, including dirt, door statuses, headlights etc - and there's even a native to copy the complete visual damage from one vehicle to another. Use these natives to store the state of the vehicle in more detail, and apply that when the vehicle is spawned again. Examples of all the natives are here (https://cdn.rage.mp/public/natives/#native_0x8F17BC8BA08DA62B)
  19. sparx

    Interiors

    Either create your own, using 3D modelling software and going through the long development process to import those maps into your server, or have a server-sided object spawning system to create interiors. You can also use mapping tools like CodeWalker / Durty and import them to Rage. If you want interiors that can view the outside world, you'll likely need 3DS max to import the original model, edit it to have cutouts on the windows / doors and create your interior that way.
  20. Without writing source code for you, the process is fairly simple if you just want to list these factions and print them to the user. Create an SQL query to fetch these faction names from your table. (SELECT <columnName> FROM <tableName>...etc) Execute it via whatever MySQL bridge you are using. This will usually return a ResultSet of some form, which you can loop through and stack onto your instantiated list. Loop the list, printing out in whatever format you want to the user. Feel free how to google how to loop through rows for whatever SQL bridge you are using, e.g. mysql2 for node, MySqlConnector for nuget.
  21. Have you enabled CEF debugging to test on the browser? Fakepath warnings are usually ok, after a quick google it seems to point to a shader issue, feel free to delve into that if you think it could be causing issues. But if you could debug on CEF via a web browser and inspect the devtools. On the other hand, change your <input> tag to <a> with your own style, seems to not cause issues with refreshing the CEF (which could be a cause of crashing?) but still calls your trigger. https://codepen.io/scomitch/pen/jOmjedy?editors=1111
  22. Multiple rows with dynamic loading as mentioned in one of the previous comments. Use JSON for less important areas of your application. You'll have an easier, faster and more secure experience with RDBs.
  23. Congrats on getting EAC approved and set up, huge step in the right direction.
  24. Have a vehicles table with all of the columns relating to the vehicles properties then a foreign key for the players unique ID (ex. OwnerID). To get the players vehicles just fetch all vehicles where the players unique ID (ID/GUID/Whatever) matches that unique ID on the vehicles table (OwnerID). To save a new vehicle to the database as mentioned above you'll have a vehicle table with the vehicle properties and it's just a matter of doing an INSERT/UPDATE query with the required data. There are other more detailed database design methods but this one is pretty universal.
  25. Looking great, you've worked hard on this feature especially with the limited props
×
×
  • Create New...