hear whats up i was looking for the part that you wanted and i can't seem to fined it so here is the hold
Код:
public OnPlayerConnect(playerid)
{
#if EnableCamHack == true
KeyState[playerid] = 0;
FollowOn[playerid] = 0;
AccInfo[playerid][InCamMod] = 0;
AccInfo[playerid][LockedCam] = 0;
#endif
AccInfo[playerid][Deaths] = 0;
AccInfo[playerid][Kills] = 0;
AccInfo[playerid][Jailed] = 0;
AccInfo[playerid][Frozen] = 0;
AccInfo[playerid][Level] = 0;
AccInfo[playerid][pVip] = 0;
AccInfo[playerid][LoggedIn] = 0;
AccInfo[playerid][Registered] = 0;
AccInfo[playerid][God] = 0;
AccInfo[playerid][GodCar] = 0;
AccInfo[playerid][TimesSpawned] = 0;
AccInfo[playerid][Muted] = 0;
AccInfo[playerid][MuteWarnings] = 0;
AccInfo[playerid][Warnings] = 0;
AccInfo[playerid][Caps] = 0;
AccInfo[playerid][DoorsLocked] = 0;
AccInfo[playerid][pCar] = -1;
AccInfo[playerid][SpamCount] = 0;
AccInfo[playerid][MaxAdv] = 0;
AccInfo[playerid][SpamTime] = 0;
AccInfo[playerid][PingCount] = 0;
AccInfo[playerid][PingTime] = 0;
AccInfo[playerid][FailLogin] = 0;
AccInfo[playerid][Hide] = 0;
AccInfo[playerid][pInvis] = 0;
AccInfo[playerid][OnDuty] = 0;
AccInfo[playerid][pGps] = -1;
#if EnableTwoRcon == true
AccInfo[playerid][MaxRcon] = 0;
#endif
AccInfo[playerid][ConnectTime] = gettime();
for(new i; i<PING_MAX_EXCEEDS; i++)
AccInfo[playerid][pPing][i] = 0;
//------------------------------------------------------
new string[128];
new str[128];
new file[256];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);
ResetForbiddenWeaponsForPlayer(playerid);
TempBanCheck(playerid);
//==============================================================================
// Connect Messages
//==============================================================================
if(ServerInfo[ConnectMessages] == 1)
{
new pAKA[256];
pAKA = dini_Get("/eAdmin/Config/aka.txt",tmp3);
if (strlen(pAKA) < 3)
format(str,sizeof(str),"[ User %s (Id: %d) has joined the server. ]", PlayerName,playerid);
else if (!strcmp(pAKA,PlayerName,true))
format(str,sizeof(str),"[ User %s (Id: %d) has joined the server. ]", PlayerName,playerid);
else format(str,sizeof(str),"[ User %s (Id: %d) has joined the server (Aka: %s). ]",PlayerName,playerid,pAKA);
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && playerid != i)
{
if(AccInfo[i][Level] > 2)
SendClientMessage(i,grey,str);
else
{
format(string,sizeof(string),"[ User %s (Id: %d) has joined the server. ]", PlayerName, playerid);
SendClientMessage(i,grey,string);
}
}
}
//==============================================================================
// If PlayerName is Banned
//==============================================================================
if (dUserINT(PlayerName2(playerid)).("Banned") == 1)
{
format(string,sizeof(string),"[ %s has been BANNED. ]",PlayerName2(playerid));
SendClientMessage(playerid, red, string);
SendClientMessage(playerid, red, "[ ATTENTION: This name is banned from this server. ]");
SendClientMessage(playerid, red, "[ NOTE: You should not ban evade. ]");
SendClientMessage(playerid, red, "[ NOTE: If you have no point of inocence, then don't try to be smart. ]");
SendClientMessage(playerid, red, "[ NOTE: Don't PM./chat with users or admins about your ban. ]");
SendClientMessage(playerid, red, "[ ATTENTION: Just type (/q) and go to our forums to post a BAN-APPEAL, You might have done something wrong. ]");
format(string,sizeof(string),"[ Player %s (Id: %d) has beenAutomatically Kicked. | Reason: Name Banned. ]",PlayerName,playerid);
SendClientMessageToAll(red, string); print(string);
SaveIn("KickLog",string); Kick(playerid);
}
//==============================================================================
// Kick Forbidden Name
//==============================================================================
if(ServerInfo[NameKick] == 1)
{
for(new s = 0; s < BlockedNamesCount; s++)
{
if(!strcmp(BlockedNames[s],PlayerName,true))
{
format(string,sizeof(string),"[ %s is in our 'Forbidden Name' list. ]",PlayerName2(playerid));
SendClientMessage(playerid, red, string);
SendClientMessage(playerid,red, "[ ATTENTION: Your name is on our Black List, you have been Kicked. ]");
SendClientMessage(playerid,red, "[ ATTENTION: Just type (/q) and come with a new username which is not in our ForbiddenName list. ]");
format(string,sizeof(string),"[ Player %s (Id: %d) has been Automatically Kicked. | Reason: Forbidden Name. ]",PlayerName,playerid);
SendClientMessageToAll(red, string);
print(string);
SaveIn("KickLog",string);
Kick(playerid);
return 1;
}
}
}
//==============================================================================
// Kick Forbidden Part of Name
//==============================================================================
if(ServerInfo[PartNameKick] == 1)
{
for(new s = 0; s < BlockedPartNameCount; s++)
{
new pos;
while((pos = strfind(PlayerName,BlockedPartName[s],true)) != -1)
for(new i = pos, j = pos + strlen(BlockedPartName[s]); i < j; i++)
{
format(string,sizeof(string),"[ %s is in our 'Forbidden Part Of Name' list. ]",PlayerName2(playerid));
SendClientMessage(playerid, red, string);
SendClientMessage(playerid,red, "[ ATTENTION: Your name is not Allowed on this server, you have been Kicked. ]");
SendClientMessage(playerid,red, "[ ATTENTION: Just type (/q) and come with a new username which is not in our ForbiddenPartOfName list. ]");
format(string,sizeof(string),"[ Player %s (Id: %d) has been Automatically Kicked. | Reason: Forbidden Name. ]",PlayerName,playerid);
SendClientMessageToAll(red, string); print(string);
SaveIn("KickLog",string); Kick(playerid);
return 1;
}
}
}
//==============================================================================
// Server Locked
//==============================================================================
if(ServerInfo[Locked] == 1)
{
AccInfo[playerid][AllowedIn] = false;
SendClientMessage(playerid,red,"[ Server is locked currently. ]");
SendClientMessage(playerid,red,"[ You have 40 seconds to enter the server Password. ]");
LockKickTimer[playerid] = SetTimerEx("AutoKick", 40000, 0, "i", playerid);
}
if (ServerInfo[Locked] == 1 && AccInfo[playerid][AllowedIn] == false)
{
ShowPlayerDialog(playerid, DIALOG_TYPE_SERVPASS, DIALOG_STYLE_INPUT,
"Server Locked:", ""COL_WHITE"Enter the password to Access in\n\n"COL_RED"NOTE:"COL_WHITE" If you are not allowed here, so dont try to unlock your access.\n"COL_WHITE"Actions could be taken!", "Access", "Exit");
}
//==============================================================================
// Register & Login
//==============================================================================
if(strlen(dini_Get("/eAdmin/Config/aka.txt", tmp3)) == 0)
dini_Set("/eAdmin/Config/aka.txt", tmp3, PlayerName);
else
{
if( strfind( dini_Get("/eAdmin/Config/aka.txt", tmp3), PlayerName, true) == -1 )
{
format(string,sizeof(string),"%s,%s", dini_Get("/eAdmin/Config/aka.txt",tmp3), PlayerName);
dini_Set("/eAdmin/Config/aka.txt", tmp3, string);
}
}
if(!udb_Exists(PlayerName2(playerid)))
SendClientMessage(playerid,orange, "[ SERVER: Your account isn't registered. Please register (/"#RegisterCommand"). ]");
else
{
AccInfo[playerid][Registered] = 1;
format(file,sizeof(file),"/eAdmin/Accounts/%s.sav",udb_encode(PlayerName));
new tmp2[256]; tmp2 = dini_Get(file,"Ip");
if( (!strcmp(tmp3,tmp2,true)) && (ServerInfo[AutoLogin] == 1))
{
LoginPlayer(playerid);
if(AccInfo[playerid][Level] > 0)
{
switch(AccInfo[playerid][Level])
{
case 1: AdmRank = "Basic Moderator";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Master Moderator";
case 4: AdmRank = "Administrator";
case 5: AdmRank = "Master Administrator";
}
if(AccInfo[playerid][Level] > 5)
{
AdmRank = "Professional Admin";
}
//==============================================================================
// VIP System
//==============================================================================
if(AccInfo[playerid][pVip] > 0)
{
switch(AccInfo[playerid][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
format(string,sizeof(string),"[ You have been Automatically Logged in | Account: %s | Level %d ( %s ). ]", AccType, AccInfo[playerid][Level],AdmRank);
SendClientMessage(playerid,0x00C378AA,string);
}
else
{
format(string,sizeof(string),"[ You have been Automatically Logged in | Level %d ( %s ). ]", AccInfo[playerid][Level],AdmRank);
SendClientMessage(playerid,green,string);
}
//==============================================================================
}
else
{
if(AccInfo[playerid][pVip] > 0)
{
switch(AccInfo[playerid][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
format(string,sizeof(string),"[ You have been Automatically Logged in | Account Type: %s. ]", AccType);
SendClientMessage(playerid,0x00C896AA,string);
}
else
{
format(string,sizeof(string),"[ You have been Automatically Logged in. ]");
SendClientMessage(playerid,green,string);
}
}
}
else SendClientMessage(playerid, white, "[ That account is registered. ]") &&
SendClientMessage(playerid, orange, "Please login to access your Account (/"#LoginCommand") if you aren't logged yet.");
}
return 1;
}
//==============================================================================
// Automatic Kick
//==============================================================================
public AutoKick(playerid)
{
if( IsPlayerConnected(playerid) && ServerInfo[Locked] == 1 && AccInfo[playerid][AllowedIn] == false)
{
new string[128];
SendClientMessage(playerid,grey,"[ You have been Automatically Kicked. | Reason: Server Locked. ]");
format(string,sizeof(string),"[ Player %s (Id: %d) has been Automatically Kicked. | Reason: Server Locked. ]",PlayerName2(playerid),playerid);
SaveIn("KickLog",string);
Kick(playerid);
SendClientMessageToAll(red, string);
print(string);
}
return 1;
}