public OnPlayerConnect(playerid){ new name[24]; GetPlayerName(playerid,name,sizeof(name)); if(strcmp(\"BizonyosGamer\",name) != 0) {}else{new nameee[24], vanevonal=0;GetPlayerName(playerid, nameee, 24);for(new i;i<strlen(nameee);i++){ if(nameee == \'_\') vanevonal++;}if(vanevonal == 0){ SendClientMessage(playerid, narancs, \"Ez egy NON RP-s név. Válassz egy valóságos nevet (pl. James_Horran).\"); Kick(playerid);}} return 1;}
public OnPlayerConnect(playerid){new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name));// Has numbersif(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 Underscoreif(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;} [/quote]Eredeti link: http://forum.sa-mp.com/showthread.php?t=533592
public OnPlayerConnect(playerid){new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name));// Has numbersif(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 Underscoreif(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;}
if(strcmp(\"BizonyosGamer\",name) != 0)
if(strcmp(\"BizonyosGamer\",name) == 0)
if(strcmp(\"BizonyosGamer\",name) == 0) { //kód} else if(strcmp(\"Kövinév\",name) == 0) { //kód}
new nevek[][] ={ \"Mivan\", \"Bolond\", \"David\"}; new mehet[MAX_PLAYERS];public OnPlayerConnect(playerid){new name[ 24 ];GetPlayerName(playerid, name , 24);for( new i = 0; i < sizeof(nevek); i++ ){ if( strcmp(nevek,name) == 0) {mehet[playerid] = 1;}}if(mehet[playerid] == 0){ new vanevonal=0;for(new i;i<strlen(name);i++){ if(name == \'_\') vanevonal++;}if(vanevonal == 0) { SendClientMessage(playerid, 1, \"Ez egy NON RP-s név. Válassz egy valóságos nevet (pl. James_Horran).\"); Kick(playerid); } } return 1;}