Hello, i'm using LuxAdmin and I added it on my Gamemode. but when i open the server in my pc and i connect in chat i see messages with register etc but when other player connect , the messages dont exists for him , i tested i gived my server to somebody and when he opened for him the messages exists but when i connected the messages dont exists for me why?
What's the problem here..
pawn Code:
public OnPlayerConnect(playerid)
{
#if EnableCamHack == true
KeyState[playerid] = 0;
FollowOn[playerid] = 0;
AccInfo[playerid][InCamMod] = 0;
AccInfo[playerid][LockedCam] = 0;
#endif
AccInfo[playerid][StuntPoints] = 0;
AccInfo[playerid][StuntsDone] = 0;
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[600];
new str[128];
new file[256];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);
SetPlayerColor(playerid, PlayerColors[playerid]);
ResetForbiddenWeaponsForPlayer(playerid);
TempBanCheck(playerid);
//==============================================================================
// Register & Login
//==============================================================================
if(strlen(dini_Get("LuxAdmin/Config/aka.txt", tmp3)) == 0)
dini_Set("LuxAdmin/Config/aka.txt", tmp3, PlayerName);
else
{
if( strfind( dini_Get("LuxAdmin/Config/aka.txt", tmp3), PlayerName, true) == -1 )
{
format(string,sizeof(string),"%s,%s", dini_Get("LuxAdmin/Config/aka.txt",tmp3), PlayerName);
dini_Set("LuxAdmin/Config/aka.txt", tmp3, string);
}
}
if(!udb_Exists(PlayerName2(playerid)))
SendClientMessage(playerid,orange, "{00AA00}SERVER: {FFFFFF}Your account isn't registered. Please register {999999}(/"#RegisterCommand")");
else
{
AccInfo[playerid][Registered] = 1;
format(file,sizeof(file),"/LuxAdmin/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 = "Moderator";
case 2: AdmRank = "Administrator";
case 3: AdmRank = "Head Admin";
case 4: AdmRank = "Server Owner";
}
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 {FFFFFF}| Account: {00AA00}%s {FFFFFF}| Level {00AA00}%d - %s", AccType, AccInfo[playerid][Level],AdmRank);
SendClientMessage(playerid,0x00C378AA,string);
}
else
{
format(string,sizeof(string),"You have been Automatically Logged in {FFFFFF}| Level: {00AA00}%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 - {FFFFFF}Account Type: {00AA00}%s", AccType);
SendClientMessage(playerid,0x00C896AA,string);
}
else
{
format(string,sizeof(string),"{FFFFFF}You have been {00AA00}Automatically Logged in.");
SendClientMessage(playerid,green,string);
}
}
}
else SendClientMessage(playerid, white, "That account is registered!") &&
SendClientMessage(playerid, orange, "{FFFFFF}Please login to access your Account {999999}(/"#LoginCommand")");
}
//==============================================================================
// Connect Messages
//==============================================================================
if(ServerInfo[ConnectMessages] == 1)
{
new pAKA[256];
pAKA = dini_Get("LuxAdmin/Config/aka.txt",tmp3);
if (strlen(pAKA) < 3)
format(str,sizeof(str),"* {%06x}%s (Id:%d) {999999}has joined the server", GetPlayerColor(playerid) >>> 8, PlayerName,playerid);
else if (!strcmp(pAKA,PlayerName,true))
format(str,sizeof(str),"* {%06x}%s (Id:%d) {999999}has joined the server", GetPlayerColor(playerid) >>> 8, PlayerName,playerid);
else format(str,sizeof(str),"* {%06x}%s (Id:%d) {999999}has joined the server {00AA00}(Aka: %s)", GetPlayerColor(playerid) >>> 8, 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),"* {%06x}%s (Id:%d) {999999}has joined the server", GetPlayerColor(playerid) >>> 8, PlayerName, playerid);
SendClientMessage(i,grey,string);
}
}
}
//==============================================================================
// If PlayerName is Muted
//==============================================================================
if( dUserINT(PlayerName2(playerid)).("Muted") == 1)
{
AccInfo[playerid][Muted] = 1;
SendClientMessage( playerid, -1, "You are still {00AA00}muted {FFFFFF}!" );
}
//==============================================================================
// If PlayerName is Jailed
//==============================================================================
if( dUserINT(PlayerName2(playerid)).("Jailed") == 1)
{
AccInfo[playerid][Jailed] = 1;
}
//==============================================================================
// If PlayerName is Banned
//==============================================================================
if (dUserINT(PlayerName2(playerid)).("Banned") == 1)
{
SendClientMessage(playerid, red, "{00AA00}ATTENTION: {999999}This name is banned from this server!");
format(string,sizeof(string),"* {%06x}%s (Id:%d) {999999}has beenAutomatically Kicked. {00AA00}| Reason: Name Banned! |", GetPlayerColor(playerid) >>> 8, 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))
{
SendClientMessage(playerid,red, "{00AA00}ATTENTION: {999999}Your name is on our Black List, you have been Kicked.");
format(string,sizeof(string),"* {%06x}%s (Id:%d) {999999}has been Automatically Kicked. {00AA00}| Reason: Forbidden Name |", GetPlayerColor(playerid) >>> 8, 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++)
{
SendClientMessage(playerid,red, "{00AA00}ATTENTION: {999999}Your name is not Allowed on this server, you have been Kicked!.");
format(string,sizeof(string),"* {%06x}%s (Id:%d) {999999}has been Automatically Kicked. {00AA00}| Reason: Forbidden Name |", GetPlayerColor(playerid) >>> 8, 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,"{FFFFFF}Server is Locked! {FF0000}-|");
SendClientMessage(playerid,red,"{FFFFFF}You have 40 seconds to enter the server Password! {FF0000}-|");
LockKickTimer[playerid] = SetTimerEx("AutoKick", 40000, 0, "i", playerid);
}
if (ServerInfo[Locked] == 1 && AccInfo[playerid][AllowedIn] == false)
{
ShowPlayerDialog(playerid, DIALOG_TYPE_SERVPASS, DIALOG_STYLE_PASSWORD,
"{00AA00}SERVER Locked!.", "{FFFFFF}Enter the password to Access it:", "Access", "Exit");
}
//
new DialogString[ 3000 ];
format( DialogString, sizeof DialogString, "%s", Connectm );
ShowPlayerDialog(playerid, ConnectT, DIALOG_STYLE_MSGBOX, "{00AA00}Stunt {1589FF}Paradise",DialogString, "OK", "");
return 1;
}
true and false are exchanged, it has a function that lets you post to admins only, let her false to disable, if you have more problems, I carry
I do not remember the name of the function, probably "msg adm" something, find and disable this function to false