06.09.2015, 21:46
Quote:
Код:
public OnPlayerConnect(playerid) { new name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); new player[200]; format(player,sizeof(player),"/whitelist/%s.txt",name); if(!dini_Exists(player)) { SendClientMessage(playerid, COLOR_YELLOW, "You are not whitelisted."); Kick(playerid); } else { // Allow player to log in. } ResetDamages(playerid); PlayAudioStreamForPlayer(playerid, RandMusic[random(sizeof(RandMusic))]); SetPlayerColor(playerid, COLOR_CONNECT); ResetPlayerVariables(playerid); RemoveBuildingsForMall(playerid); CreateAllTextDraws(playerid); Delete3DTextLabel(death[playerid]); SeatBelt[playerid] = 0; SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1); SetIntVar(playerid, "VehicleBuyConfirm", 0); // Allow player to log in. return 1; } Okay so i removed the kick(playerid); code so i could whitelist myself that works but when i login and im not whitelisted it just kicks me without sending the message any idea? |
OR
Create a file at server startup when you register adds the nicknames of players
..\Server\filescripts\whitelist.txt
Код:
[WHITELIST] name_0 = alexanderjb918 name_1 = Logofero name_2 = Nick
But I would advise you not white and black list, and add it in violation /bl [playerid] [reason]
..\Server\filescripts\blacklist.txt
Код:
[alexanderjb918] ip = 255.255.255.255 reason = cheater [Logofero] ip = 255.255.255.255 reason = bad support [Nick] ip = 255.255.255.255 reason = well bot