Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward CheckIfAccountExists(playerid, accountName[24]);
- public CheckIfAccountExists(playerid, accountName[24])
- {
- new query[128];
- mysql_format(db, query, sizeof(query), "SELECT uName FROM logindata WHERE uName = '%e';", accountName);
- mysql_function_query(db, query, false, "OnRequestNickRegistered", "i", playerid);
- }
- forward public OnRequestNickRegistered(playerid);
- public OnRequestNickRegistered(playerid)
- {
- new rows = cache_num_rows();
- new msg[128], name[128];
- if(rows)
- {
- format(msg, sizeof(msg), "Player %s exists in the database", playerName);
- SendClientMessage(playerid, COLOR_GREEN, msg);
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "Admin %s has just checked if the player %s exists in the database and he does.", name, playerName);
- print(msg);
- }
- else
- {
- format(msg, sizeof(msg), "Player %s doesn't exist in the database", playerName);
- SendClientMessage(playerid, COLOR_RED, msg);
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "Admin %s has just checked if the player %s exists in the database and he doesn't.", name, playerName);
- print(msg);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment