Help on connect messages
#1

why im seeing the connect messages two times , i mean why when player join my server im seeing it two times the connect message
Reply
#2

Show the code Please
How we can help you without code
Reply
#3

the public onplayerconnect code right?
Reply
#4

yes Fast Please
Reply
#5

// 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 Just joined the server.[ Country: %s | IP Address: %s ]", PlayerName,GetPlayerCountryName(playerid),IP,GetPl ayerPing(playerid));
SendClientMessageToAll(COLOR_YELLOW, 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;
}
}
}
//-----------------------------------------------------
if(ServerInfo[PartNameKick] == 1) {
for(new s = 0; s < BadPartNameCount; s++) {
new pos;
while((pos = strfind(PlayerName,BadPartNames[s],true)) != -1) for(new i = pos, j = pos + strlen(BadPartNames[s]); i < j; i++)
{
SendClientMessage(playerid,red, "Your name is not allowed on this server, 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;
}
}
}
//-----------------------------------------------------
if(ServerInfo[Locked] == 1) {
PlayerInfo[playerid][AllowedIn] = false;
SendClientMessage(playerid,red,"Server is Locked! You have 20 seconds to enter the server password before you are kicked!");
SendClientMessage(playerid,red," Type /password [password]");
LockKickTimer[playerid] = SetTimerEx("AutoKick", 20000, 0, "i", playerid);
}
//-----------------------------------------------------
if(strlen(dini_Get("ladmin/config/aka.txt", tmp3)) == 0) dini_Set("ladmin/config/aka.txt", tmp3, PlayerName);
else
{
if( strfind( dini_Get("ladmin/config/aka.txt", tmp3), PlayerName, true) == -1 )
{
new akastring[256];
format(akastring,sizeof(akastring),"%s,%s", dini_Get("ladmin/config/aka.txt",tmp3), PlayerName);
dini_Set("ladmin/config/aka.txt", tmp3, akastring);
}
}
//-----------------------------------------

for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && playerid != i) SendClientMessage(i,grey,string);
//-----------------------------------------
if(!udb_Exists(PlayerName2(playerid))) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
format(string, sizeof(string), "Welcome %s, to Gamer World edited by Gamer", PlayerName);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
SendClientMessage(playerid,COLOR_YELLOW, "You have been given $50000 starting money since you have no saved money as of yet!");
SendClientMessage(playerid,COLOR_YELLOW, "You can register your current player name with (/"#RegisterCommand")");
SendClientMessage(playerid,COLOR_ORANGE, "You must register and login to gain access to money, bank and vehicle saving options!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /help to get started and type /credits for a list of people who contributed.");
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
GivePlayerMoney(playerid,50000);
}
if(udb_Exists(PlayerName2(playerid))) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
format(string, sizeof(string), "Welcome %s, to Gamer World edited by Gamer", PlayerName);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
format(file,256,"/ladmin/users/%s.sav",udb_encode(PlayerName));
new tmp[50],tmp2[256];
GetPlayerIp(playerid,tmp,12;
tmp2 = dini_Get(file,"ip");
if(!strcmp(tmp,tmp2,true) && ServerInfo[AutoLogin] == 1) {
format(string,128,"Welcome back to Gamer World edited by Gamer, %s. You have automatically been logged in.",PlayerName);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
PlayerInfo[playerid][LoggedIn] = 1;
GivePlayerMoney(playerid,dUserINT(PlayerName2(play erid)).("money")-GetPlayerMoney(playerid));
PlayerInfo[playerid][Deaths] = (dUserINT(PlayerName2(playerid)).("deaths"));
PlayerInfo[playerid][Kills] = (dUserINT(PlayerName2(playerid)).("kills"));
PlayerInfo[playerid][Level] = (dUserINT(PlayerName2(playerid)).("level"));
PlayerInfo[playerid][Registered] = 1;
LoadPlayer(playerid);
}
else {
format(string,sizeof(string),"The name %s, is already registered on this server. Please login or you will be disconnected in 60 seconds!",PlayerName);
GameTextForPlayer(playerid,"~r~Please /login Pasword.",10000,4);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
PlayerInfo[playerid][LoggedIn] = 0;
SetTimerEx("KickTimer",60000,0,"i",playerid);
}
}
//-----------------------------------------
RecentAskedMechanic[playerid] =0;
speedo[playerid] = 1;
PlayerInfo[playerid][vhpb] = 1;
Calling[playerid] = -1;
Answered[playerid] = 0;
Callerid[playerid] = 0;
HasPGP[playerid] = 0;
HasAirP[playerid] = 0;
cuffed[playerid] = 0;
Tazed[playerid] = 0;
hastazer[playerid] = 0;
LawEnforcementRadio[playerid] = 0;
HasLawEnforcementRadio[playerid] = 0;
ReqBk[playerid] = 0;
ReqBkRecent[playerid] = 0;
ReportedRecent[playerid] = 0;
VisitReq[playerid] = 0;
EscapedConvict[playerid] = 0;
VisitReqExpires[playerid] = 0;
StoleCopCarRecent[playerid] = 0;
triedtoescaperecent[playerid] = 0;
JailTime[playerid] = 0;
JailTimeServed[playerid] = 0;
copshavevc[playerid] = 0;
commitedcrimerecently[playerid] = 0;
wantsheal[playerid] = 0;
wantscure[playerid] = 0;
InfectedPlyRecent[playerid] = 0;
wantsweed[playerid] = 0;
playeronweed[playerid] = 0;
playertookweed[playerid] = 0;
HasWeedBag[playerid] = 0;
CuffedTime[playerid] = 0;
cannotescapejail[playerid] = 0;
RobbedPlyRecent[playerid] = 0;
beenrobbedrecently[playerid] = 0;
HasWallet[playerid] = 0;
OldCash[playerid] = 0;
fixedcarrecent[playerid] =0;
//SendClientMessage(playerid,0xC0C0C0FF,"Please choose a language : /en (default is EN)");
}
return 1;
}
Reply
#6

Can you tell mee what message you get 2 times ?
Reply
#7

the connect messages
Reply
#8

Witch tell me i dont know you connect message
Tell mee where is
What meesage you got
EXAMPLE: Driver has joined the server


ConnectMessages Tell me this function COde
Reply
#9

yeah i see that two times
one with yellow and another with grey
Reply
#10

ConnectMessages Tell me this function COde
Reply


Forum Jump:


Users browsing this thread: