Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include "../include/gl_common.inc"
- #include <core>
- #include <a_mysql>
- #include <float>
- public OnGameModeInit()
- {
- mysql_connect("localhost", "root", "serveurgta", "");
- return 1;
- }
- public OnGameModeExit()
- {
- mysql_close();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new sUsername[MAX_PLAYER_NAME],
- sQuery[256];
- GetPlayerName(playerid, sUsername, sizeof(sUsername));
- format(sQuery, sizeof(sQuery), "SELECT * FROM `membres` WHERE `Nom_Ig`='%s' LIMIT 1;", sUsername);
- mysql_query(sQuery);
- mysql_store_result();
- if (mysql_num_rows() == 1)
- SendClientMessage(playerid, 0x1D76E2FF, "Votre compte existe !");
- else
- SendClientMessage(playerid, 0x1D76E2FF, "Votre compte n'existe pas !");
- mysql_free_result();
- return 1;
- }
Add Comment
Please, Sign In to add comment