Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Non-RP Name Checker by Joshman543 Don't remove the credits or I will find you. ;)
- #include <a_samp>
- #define FILTERSCRIPT
- #define COLOR_LIGHTRED 0xFF6347FF
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Non-RP Name Detector by Joshman543 successfully working");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Non-RP Name Detector successfully shut down");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
- GetPlayerName(playerid, name, sizeof(name));
- // Has numbers
- if(strfind(name, "0", true) != -1 || strfind(name, "1", true) != -1 || strfind(name, "2", true) != -1 || strfind(name, "3", true) != -1 || strfind(name, "4", true) != -1 || strfind(name, "5", true) != -1
- || strfind(name, "6", true) != -1 || strfind(name, "7", true) != -1 || strfind(name, "8", true) != -1 || strfind(name, "9", true) != -1 || strfind(name, "[", true) != -1 || strfind(name, "]", true) != -1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}This is a RP Server, please reconnect using Firstname_Lastname format.");
- SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Also, please remove the numbers and/or tags in your name.");
- new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s has been kicked from the server for having a Non-RP name.", name);
- SendClientMessageToAll(0xC4C4C4FF, string);
- Kick(playerid);
- }
- // No Underscore
- if(strfind( name, "_", true) == -1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}This is a RP Server, please reconnect using Firstname_Lastname format.");
- format(string, sizeof(string), "%s has been kicked from the server for having a Non-RP name.", name);
- SendClientMessageToAll(0xC4C4C4FF, string);
- Kick(playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment