• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [HELP]How to Retrieve and Use Values from MySQL Database in SA-MP Server?
#1
Hi everyone,

Hi, I’m trying to make a UCP system for my SA-MP roleplay server, but I’m really new to this, and I’m stuck. My idea is that players will register on a website outside the game, and the website will save their data (like username and email) into a MySQL database. When they join the game, I want the server to get that data (like their email) and show it in something like a dialog or a
/stats command. I don’t really understand how to make the server read the data from the database and display it in-game. Can someone explain how to do this step by step?

Here’s what I’m trying to achieve:
  1. Retrieve Data: How can I fetch the player’s email from the MySQL database when they log in?
  2. Display Data: How do I show the retrieved email in a dialog or a command (like/stats)?
  3. Syncing: What’s the best way to ensure that the data in the database matches the player in-game?
I’m using XAMPP for the database and the MySQL plugin for SA-MP. If anyone has example scripts, explanations, or best practices for linking the UCP with the SA-MP server, I’d greatly appreciate it!
Thanks in advance!
  Reply
#2
https://github.com/pBlueG/SA-MP-MySQL/bl...-cache.pwn

Esse exemplo é do proprio plugin do mySQL samp
  Reply


Forum Jump: