16.07.2015, 02:34
public OnPlayerConnect(playerid)
{
// iTranslate_OnPlayerConnect(playerid);
//-----------------------------------LUsers-------------------------------------
PlayerInfo[playerid][bank] = 0;
PlayerInfo[playerid][bowner] = 0;
PlayerInfo[playerid][bowned] = 0;
PlayerInfo[playerid][Deaths] = 0;
PlayerInfo[playerid][Kills] = 0;
PlayerInfo[playerid][Jailed] = 0;
PlayerInfo[playerid][Frozen] = 0;
PlayerInfo[playerid][Level] = 0;
PlayerInfo[playerid][LoggedIn] = 0;
PlayerInfo[playerid][Registered] = 0;
PlayerInfo[playerid][God] = 0;
PlayerInfo[playerid][TimesSpawned] = 0;
PlayerInfo[playerid][Muted] = 0;
PlayerInfo[playerid][MuteWarnings] = 0;
PlayerInfo[playerid][Warnings] = 0;
PlayerInfo[playerid][Caps] = 0;
PlayerInfo[playerid][DoorsLocked] = 0;
for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing][i] = 0;
PlayerInfo[playerid][SpamCount] = 0;
PlayerInfo[playerid][SpamTime] = 0;
PlayerInfo[playerid][PingCount] = 0;
PlayerInfo[playerid][PingTime] = 0;
PlayerInfo[playerid][FailLogin] = 0;
PlayerInfo[playerid][ConnectTime] = gettime();
//-----------------------------------------------------
InShamal[playerid] = 0;
InAndrom[playerid]=0;
PlayerInfo[playerid][gang]=0;
gangInvite[playerid]=0;
format(tstring, sizeof(tstring), " ");
//-------------------------
TextDrawShowForPlayer(playerid, rules0);
TextDrawShowForPlayer(playerid, rules1);
TextDrawShowForPlayer(playerid, rules2);
new PlayerName[128],string[128], file[256];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);
if(!strcmp(PlayerName,DEFAULT_OWNER)){
SendClientMessage(playerid, red, "This Name is Blacklisted!");
format(string,sizeof(string),"%s has been kicked by Server [reason: Blacklisted Name] ",PlayerName);
SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string);
print(string);
}
if((!strcmp(tmp3,"74.115.0.***")) || (!strcmp(tmp3,"74.115.1.***")) || (!strcmp(tmp3,"74.115.2.***")) || (!strcmp(tmp3,"74.115.3.***")) || (!strcmp(tmp3,"74.115.4.***")) || (!strcmp(tmp3,"74.115.5.***")) || (!strcmp(tmp3,"74.115.6.***")) || (!strcmp(tmp3,"74.115.7.***"))) {
SendClientMessage(playerid, red, "Dont Use HotSpotShield or any other ip spoofing program!");
format(string,sizeof(string),"%s has been kicked by Server [reason: HotSpotShield] ",PlayerName);
SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string);
print(string);
return Kick(playerid);
}
if(ServerInfo[ConnectMessages] == 1)
{
new IP[128];
GetPlayerIp(playerid,IP,sizeof(IP));
format(string, sizeof(string), "%s Has joined the server.[ Country: %s | IP Address: PrivateIP ]", PlayerName,GetPlayerCountryName(playerid),GetPlaye rPing(playerid));
SendClientMessageToAll(COLOR_RED, string);
}
//-----------------------------------------------------
if (dUserINT(PlayerName2(playerid)).("banned") == 1)
{
SendClientMessage(playerid, red, "This name is banned from this server!");
format(string,sizeof(string),"%s ID:%d was auto kicked. Reason: Name banned from server",PlayerName,playerid);
SendClientMessageToAll(grey, string); print(string);
SaveToFile("KickLog",string); Kick(playerid);
}
//-----------[ Name Kick ]-----------------
if(ServerInfo[NameKick] == 1) {
for(new s = 0; s < BadNameCount; s++) {
if(!strcmp(BadNames[s],PlayerName,true)) {
SendClientMessage(playerid,red, "Your name is on our black list, you have been kicked.");
format(string,sizeof(string),"%s ID:%d was auto kicked. (Reason: Forbidden name)",PlayerName,playerid);
SendClientMessageToAll(grey, string); print(string);
SaveToFile("KickLog",string); Kick(playerid);
return 1;
}
}
}
its not all the openplayer connect i just send you the codes you need ,
{
// iTranslate_OnPlayerConnect(playerid);
//-----------------------------------LUsers-------------------------------------
PlayerInfo[playerid][bank] = 0;
PlayerInfo[playerid][bowner] = 0;
PlayerInfo[playerid][bowned] = 0;
PlayerInfo[playerid][Deaths] = 0;
PlayerInfo[playerid][Kills] = 0;
PlayerInfo[playerid][Jailed] = 0;
PlayerInfo[playerid][Frozen] = 0;
PlayerInfo[playerid][Level] = 0;
PlayerInfo[playerid][LoggedIn] = 0;
PlayerInfo[playerid][Registered] = 0;
PlayerInfo[playerid][God] = 0;
PlayerInfo[playerid][TimesSpawned] = 0;
PlayerInfo[playerid][Muted] = 0;
PlayerInfo[playerid][MuteWarnings] = 0;
PlayerInfo[playerid][Warnings] = 0;
PlayerInfo[playerid][Caps] = 0;
PlayerInfo[playerid][DoorsLocked] = 0;
for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing][i] = 0;
PlayerInfo[playerid][SpamCount] = 0;
PlayerInfo[playerid][SpamTime] = 0;
PlayerInfo[playerid][PingCount] = 0;
PlayerInfo[playerid][PingTime] = 0;
PlayerInfo[playerid][FailLogin] = 0;
PlayerInfo[playerid][ConnectTime] = gettime();
//-----------------------------------------------------
InShamal[playerid] = 0;
InAndrom[playerid]=0;
PlayerInfo[playerid][gang]=0;
gangInvite[playerid]=0;
format(tstring, sizeof(tstring), " ");
//-------------------------
TextDrawShowForPlayer(playerid, rules0);
TextDrawShowForPlayer(playerid, rules1);
TextDrawShowForPlayer(playerid, rules2);
new PlayerName[128],string[128], file[256];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);
if(!strcmp(PlayerName,DEFAULT_OWNER)){
SendClientMessage(playerid, red, "This Name is Blacklisted!");
format(string,sizeof(string),"%s has been kicked by Server [reason: Blacklisted Name] ",PlayerName);
SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string);
print(string);
}
if((!strcmp(tmp3,"74.115.0.***")) || (!strcmp(tmp3,"74.115.1.***")) || (!strcmp(tmp3,"74.115.2.***")) || (!strcmp(tmp3,"74.115.3.***")) || (!strcmp(tmp3,"74.115.4.***")) || (!strcmp(tmp3,"74.115.5.***")) || (!strcmp(tmp3,"74.115.6.***")) || (!strcmp(tmp3,"74.115.7.***"))) {
SendClientMessage(playerid, red, "Dont Use HotSpotShield or any other ip spoofing program!");
format(string,sizeof(string),"%s has been kicked by Server [reason: HotSpotShield] ",PlayerName);
SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string);
print(string);
return Kick(playerid);
}
if(ServerInfo[ConnectMessages] == 1)
{
new IP[128];
GetPlayerIp(playerid,IP,sizeof(IP));
format(string, sizeof(string), "%s Has joined the server.[ Country: %s | IP Address: PrivateIP ]", PlayerName,GetPlayerCountryName(playerid),GetPlaye rPing(playerid));
SendClientMessageToAll(COLOR_RED, string);
}
//-----------------------------------------------------
if (dUserINT(PlayerName2(playerid)).("banned") == 1)
{
SendClientMessage(playerid, red, "This name is banned from this server!");
format(string,sizeof(string),"%s ID:%d was auto kicked. Reason: Name banned from server",PlayerName,playerid);
SendClientMessageToAll(grey, string); print(string);
SaveToFile("KickLog",string); Kick(playerid);
}
//-----------[ Name Kick ]-----------------
if(ServerInfo[NameKick] == 1) {
for(new s = 0; s < BadNameCount; s++) {
if(!strcmp(BadNames[s],PlayerName,true)) {
SendClientMessage(playerid,red, "Your name is on our black list, you have been kicked.");
format(string,sizeof(string),"%s ID:%d was auto kicked. (Reason: Forbidden name)",PlayerName,playerid);
SendClientMessageToAll(grey, string); print(string);
SaveToFile("KickLog",string); Kick(playerid);
return 1;
}
}
}
its not all the openplayer connect i just send you the codes you need ,