30.12.2010, 16:05
Код:
#define ADMIN_LAST_NAME_ONLY "admin" enum names { "souadmin", "administrador", "Mradmin" }; new allow[names]; onplayerconnect for(i=0;i<=2;i++;) { if(GetPlayerLastName(playerid) == ADMIN_LAST_NAME_ONLY && !GetPlayerFirstName(playerid) == allow[i]) { kick(playerid); } } stock GetPlayerFirstName(playerid) { new namestring[2][MAX_PLAYER_NAME]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); split(name, namestring, '_'); return namestring[0]; } stock GetPlayerLastName(playerid) { new namestring[2][MAX_PLAYER_NAME]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); split(name, namestring, '_'); return namestring[1]; }