07.03.2012, 14:42
hey guys,
i have changed my server name and now i also have changed my names of when a player joins the server cuz first there was staying: player: [drifters]niels has joined Party Islands Freeroam.
but i changed that in the code cuz i changed server name...
i changed it in onplayerconnect and disconnect but somehow to old name is still saying...
so i mean
i have changed the codes to the new name: Galaxy Freeroam but when a player joins it still says Party Islands Freeroam... i hope you understand me but eehm here are my codes:
disconnect:
connect:
its only about the part which says a msg when player has joined but i have posted whole onplayerconnect here XD maybe ther is something blocking it.. i dont know why but anyways pls help... i have checked my gamemode, admin system, all my filterscripts and everything more then 1 times and i still cant find ANYTHING wrong
anyone sees whats the problem here?
pls help
greets niels
btw: the ones who help me get REP+
i have changed my server name and now i also have changed my names of when a player joins the server cuz first there was staying: player: [drifters]niels has joined Party Islands Freeroam.
but i changed that in the code cuz i changed server name...
i changed it in onplayerconnect and disconnect but somehow to old name is still saying...
so i mean
i have changed the codes to the new name: Galaxy Freeroam but when a player joins it still says Party Islands Freeroam... i hope you understand me but eehm here are my codes:
disconnect:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new PlayerName[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(ServerInfo[ConnectMessages] == 1)
{
switch (reason) {
case 0: format(str, sizeof(str), "{FFFF00}Player {FF0000}%s (Id:%d) {FFFF00}has Left {FF0000}Galaxy FreeRoam(: Crash/Timeout :)", PlayerName, playerid);
case 1: format(str, sizeof(str), "{FFFF00}Player {FF0000}%s (Id:%d) {FFFF00}has Left {FF0000}Galaxy FreeRoam(: Leaving :)", PlayerName, playerid);
case 2: format(str, sizeof(str), "{FFFF00}Player {FF0000}%s (Id:%d) {FFFF00}has Left {FF0000}Galaxy FreeRoam(: Kicked/Banned :)", PlayerName, playerid);
}
SendClientMessageToAll(grey, str);
}
if(PlayerInfo[playerid][LoggedIn] == 1) SavePlayer(playerid);
if(udb_Exists(PlayerName2(playerid))) dUserSetINT(PlayerName2(playerid)).("loggedin",0);
PlayerInfo[playerid][LoggedIn] = 0;
PlayerInfo[playerid][Level] = 0;
PlayerInfo[playerid][Jailed] = 0;
PlayerInfo[playerid][Frozen] = 0;
if(PlayerInfo[playerid][Jailed] == 1) KillTimer( JailTimer[playerid] );
if(PlayerInfo[playerid][Frozen] == 1) KillTimer( FreezeTimer[playerid] );
if(ServerInfo[Locked] == 1) KillTimer( LockKickTimer[playerid] );
if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]);
#if defined ENABLE_SPEC
for(new x=0; x<MAX_PLAYERS; x++)
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid)
AdvanceSpectate(x);
#endif
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
PlayerInfo[playerid][Helper] = 0;
PlayerInfo[playerid][Tag] = 0;
PlayerInfo[playerid][dRank] = 0;
if (udb_Exists(PlayerName2(playerid)))
{
if(PlayerInfo[playerid][LoggedIn] == 0) {
ShowPlayerDialog(playerid, 125, DIALOG_STYLE_INPUT, "Login","This Username is Registered Type The Password here","Login","Kick");
}
}
if (!udb_Exists(PlayerName2(playerid)))
{
if(PlayerInfo[playerid][Registered] == 0) {
ShowPlayerDialog(playerid, 126, DIALOG_STYLE_INPUT, "Register","This Username is Not Registred Type The Password here","Register","Kick");
}
}
if(PlayerInfo[playerid][LoggedIn] == 1)
{
new pname[128];
new file[128];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), savefolder,pname);
if(!dini_Exists(file)) {
dini_Create(file);
dini_IntSet(file, "Score", 0);
dini_IntSet(file, "Money", 0);
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
else {
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
}
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][GodCar] = 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;
PlayerInfo[playerid][pCar] = -1;
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();
//------------------------------------------------------
new PlayerName[MAX_PLAYER_NAME], string[128], str[128]; //file[256];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);
//-----------------------------------------------------
if(ServerInfo[ConnectMessages] == 1)
{
new pAKA[256]; pAKA = dini_Get("ladmin/config/aka.txt",tmp3);
if (strlen(pAKA) < 3) format(str,sizeof(str),"{FFFF00}Player {FF0000}%s (Id:%d) {FFFF00}has Joined {FF0000}Galaxy FreeRoam", PlayerName, playerid);
else if (!strcmp(pAKA,PlayerName,true)) format(str,sizeof(str),"{FFFF00}Player {FF0000}%s (Id:%d) {FFFF00}has Joined {FF0000}Galaxy FreeRoam", PlayerName, playerid);
else format(str,sizeof(str),"{FFFF00}Player {FF0000}%s (Id:%d) {FFFF00}has Joined {FF0000}Galaxy FreeRoam (aka %s)", PlayerName, playerid, pAKA );
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && playerid != i)
{
if(PlayerInfo[i][Level] > 2) SendClientMessage(i,grey,str);
else {
format(string,sizeof(string),"{FFFF00}Player {FF0000}%s (Id:%d) {FFFF00}has Joined {FF0000}Galaxy FreeRoam", PlayerName, playerid);
SendClientMessage(i,grey,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);
}
//-----------------------------------------------------
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 )
{
format(string,sizeof(string),"%s,%s", dini_Get("ladmin/config/aka.txt",tmp3), PlayerName);
dini_Set("ladmin/config/aka.txt", tmp3, string);
}
}
//-----------------------------------------------------
GetPlayerIp(playerid, ips[playerid], MAX_PLAYER_IP);
GetPlayerName(playerid, names[playerid], MAX_PLAYER_NAME);
CheckBan(playerid);
return 1;
}
anyone sees whats the problem here?
pls help
greets niels
btw: the ones who help me get REP+