06.09.2015, 12:55
Код:
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?


