Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new symbols[] =
- {
- '[', ']'
- };
- new abc[] =
- {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
- };
- new bool: Big;
- public OnPlayerConnect(playerid)
- {
- new string[128], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- if(IsPlayerNPC(playerid))
- {
- return 1;
- }
- if(strfind(pName, "_", true) == -1)
- {
- format(string, 128, ".:: %s has been kicked from this server! Reason: Change your name! FirstName_LastName ::.", pName);
- SendClientMessageToAll(0xAA3333AA, string);
- Kick(playerid);
- return 1;
- } else {
- for(new i; i <= strlen(pName); i++)
- {
- for(new j; j <= 9; j++)
- {
- if(pName[i] == j)
- {
- format(string, 128, ".:: %s has been kicked from this server! Reason: Change your name! FirstName_LastName ::.", pName);
- SendClientMessageToAll(0xAA3333AA, string);
- Kick(playerid);
- return 1;
- }
- }
- for(new j; j <= sizeof(symbols); j++)
- {
- if(pName[i] == symbols[j])
- {
- format(string, 128, ".:: %s has been kicked from this server! Reason: Change your name! FirstName_LastName ::.", pName);
- SendClientMessageToAll(0xAA3333AA, string);
- Kick(playerid);
- return 1;
- }
- }
- if(i >= 1)
- {
- if(Big == true)
- {
- Big = false;
- continue;
- }
- if(pName[i] == '_')
- {
- Big = true;
- continue;
- }
- for(new j; j <= sizeof(abc); j++)
- {
- if(pName[i] == abc[j])
- {
- format(string, 128, ".:: %s has been kicked from this server! Reason: Change your name! FirstName_LastName ::.", pName);
- SendClientMessageToAll(0xAA3333AA, string);
- Kick(playerid);
- return 1;
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement