Quote:
Originally Posted by SANTO37
I created a website where players can subscribe.
They have to enter the game [say / steam] and register their steamid address.
However, the plugin registers all the players' data at the same time.
I just want [say / steam] to be registered.
The player registers after logging out from the server. What do I have to do to register?
|
Ok, so right now your plugin works like this:
1. Do nothing except generate errors until someone joins and writes /v (MySql_Init)
2. When a player joins, check if his/her name exists in the database table
3. If it doesn't, insert a new record with the player's information
Assuming you want it to:
1. When a player writes /steam, check if his/her SteamID exists in the database table
2. If it doesn't, insert a new record with the player's information
You should:
1. Add "MySql_Init()" directly in plugin_init() instead of registering it as a command, so that the database connection information is always available via g_SqlTuple
2. Register the "say /steam" client command instead, setting Load_MySql as it's handling function
3. Remove "Load_MySql(id)" from client_putinserver