07.03.2012, 12:57
pawn Code:
//BEFORE LINE 715 (added forwards so its 715 now)
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);
SetTimerEx("AfterPlayerConnect", 1000, 0, "i", playerid);
ResetForbiddenWeaponsForPlayer(playerid);
TempBanCheck(playerid);
return 1;
//==============================================================================
// Connect Messages -- Line 715 onwards, more if's after it
//==============================================================================
if(ServerInfo[ConnectMessages] == 1)
{
new pAKA[256];
pAKA = dini_Get("LuxAdmin/Config/aka.txt",tmp3);
if (strlen(pAKA) < 3)
format(str,sizeof(str),"* Player %s (Id:%d) has joined the server", PlayerName,playerid);
else if (!strcmp(pAKA,PlayerName,true))
format(str,sizeof(str),"* Player %s (Id:%d) has joined the server", PlayerName,playerid);
else format(str,sizeof(str),"Player %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),"* Player %s (Id:%d) has joined the server", PlayerName, playerid);
SendClientMessage(i,grey,string);
return 1;
}
}
return 0;
}