Weird Problem with my server.
#1

When I put my password and click log on I am being freezed and every players. How to fix this? Please help me.

Reward - +1rep
Reply
#2

There might be a problem in your login system. But I don't know how explain it to you without the script.

Is this the first time it happens to you?
Reply
#3

Post or pm me the login/register system you are using. Or if it is in your script, post the OnPlayerConnect or where ever you have created the system. If it is a GM made by someone, send me the link. Maybe i can help.
Reply
#4

Make an new LOGIN SYSTEM. Search on ******
Reply
#5

Hello, show me your command when you login, thanks. Eventually OnPlayerConnect.
Reply
#6

The login /admin bug

pawn Код:
SetTimerEx("PlayerStats", 1, true, "i", playerid);
   
    IsPlayerUsingAnims[playerid] = 0;
    IsPlayerAnimsPreloaded[playerid] = 0;
    if(fexist(Path_2(playerid)))
    {
        INI_ParseFile(Path_2(playerid),"LoadPostiondata_%s", .bExtra = true, .extra = playerid);
    }
        else
    {
        new INI:file = INI_Open(Path_2(playerid));
        INI_SetTag(file,"Player Car-Saver Data");

        INI_WriteFloat(file,"(1)Postion-PosX",0);
        INI_WriteFloat(file,"(1)Postion-PosY",0);
        INI_WriteFloat(file,"(1)Postion-PosZ",0);
        INI_WriteInt(file,"(1)Interior",0);

        INI_WriteFloat(file,"(2)Postion-PosX",0);
        INI_WriteFloat(file,"(2)Postion-PosY",0);
        INI_WriteFloat(file,"(2)Postion-PosZ",0);
        INI_WriteInt(file,"(2)Interior",0);

        INI_WriteFloat(file,"(3)Postion-PosX",0);
        INI_WriteFloat(file,"(3)Postion-PosY",0);
        INI_WriteFloat(file,"(3)Postion-PosZ",0);
        INI_WriteInt(file,"(3)Interior",0);

        INI_WriteFloat(file,"(4)Postion-PosX",0);
        INI_WriteFloat(file,"(4)Postion-PosY",0);
        INI_WriteFloat(file,"(4)Postion-PosZ",0);
        INI_WriteInt(file,"(4)Interior",0);

        INI_WriteFloat(file,"(5)Postion-PosX",0);
        INI_WriteFloat(file,"(5)Postion-PosY",0);
        INI_WriteFloat(file,"(5)Postion-PosZ",0);
        INI_WriteInt(file,"(5)Interior",0);

        INI_Close(file);
    }

    new pFile[35];
    format(pFile, 35, Player_File, GetName(playerid));

    if(fexist(pFile))
    {
        new INI:UserFile = INI_Open(pFile);
       
        INI_WriteInt(UserFile, "Admin", 0);
        INI_WriteInt(UserFile, "Money", START_MONEY);
        INI_WriteInt(UserFile, "Score", 0);
        INI_WriteInt(UserFile, "Skin", SKIN_ID);
        INI_WriteInt(UserFile, "Warn", 0);
        INI_WriteInt(UserFile, "VIP", 0);
        INI_Close(UserFile);

        SetPVarInt(playerid, "Registered", 1);
        SetPVarInt(playerid, "Logged", 1);
    }
else
    {
        INI_ParseFile(pFile, "LoadPlayerData", .bExtra = true, .extra = playerid);
        SetPVarInt(playerid, "Logged", 1);
    }

    SetPVarInt(playerid, "Join", 1);

    IsOnDuty[playerid]=0;

    pvehicleid[playerid] = GetPlayerVehicleID(playerid);
    pvehicleid[playerid] = 0;
    pmodelid[playerid] = 0;

    SetTimerEx("StartBurn", 30000, false, "i", playerid);
    SetTimerEx("StartFix", 30000, false, "i", playerid);
    SetTimerEx("StartHeal", 30000, false, "i", playerid);

    IsLogged[playerid]=0;
    Rank[playerid]=0;
    m_w1[playerid]=1;
    m_w2[playerid]=1;
    m_w3[playerid]=1;
    m_w4[playerid]=1;

    Attach3DTextLabelToPlayer(PlayerLabel[playerid], playerid, 0.0, 0.0, 0.7);

    IsPlayerCapturing[playerid][SNAKE] = 0;
    IsPlayerCapturing[playerid][BAY] = 0;
    IsPlayerCapturing[playerid][BIG] = 0;
    IsPlayerCapturing[playerid][ARMY] = 0;
    IsPlayerCapturing[playerid][PETROL] = 0;
    IsPlayerCapturing[playerid][OIL] = 0;
    IsPlayerCapturing[playerid][DESERT] = 0;
    IsPlayerCapturing[playerid][QUARRY] = 0;
    IsPlayerCapturing[playerid][GUEST] = 0;
    IsPlayerCapturing[playerid][EAR] = 0;

    CountVar[playerid][SNAKE] = 25;
    CountVar[playerid][BAY] = 25;
    CountVar[playerid][BIG] = 25;
    CountVar[playerid][PETROL] = 25;
    CountVar[playerid][ARMY] = 25;
    CountVar[playerid][DESERT] = 25;
    CountVar[playerid][OIL] = 25;
    CountVar[playerid][QUARRY] = 25;
    CountVar[playerid][GUEST] = 25;
    CountVar[playerid][EAR] = 25;

    if(tCP[SNAKE] == TEAM_NONE) GangZoneShowForAll(Zone[SNAKE], -66);
    else if(tCP[SNAKE] == ASIA) GangZoneShowForAll(Zone[SNAKE], ZONE_ASIA_COLOR);
    else if(tCP[SNAKE] == AFRICA) GangZoneShowForAll(Zone[SNAKE], ZONE_AFRICA_COLOR);
    else if(tCP[SNAKE] == EUROPE) GangZoneShowForAll(Zone[SNAKE], ZONE_EUROPE_COLOR);
    else if(tCP[SNAKE] == AUSTRALIA) GangZoneShowForAll(Zone[SNAKE], ZONE_AUSTRALIA_COLOR);
    else if(tCP[SNAKE] == AMERICA) GangZoneShowForAll(Zone[SNAKE], ZONE_AMERICA_COLOR);
    //------
    if(tCP[BAY] == TEAM_NONE) GangZoneShowForAll(Zone[BAY], -66);
    else if(tCP[BAY] == ASIA) GangZoneShowForAll(Zone[BAY], ZONE_ASIA_COLOR);
    else if(tCP[BAY] == AFRICA) GangZoneShowForAll(Zone[BAY], ZONE_AFRICA_COLOR);
    else if(tCP[BAY] == EUROPE) GangZoneShowForAll(Zone[BAY], ZONE_EUROPE_COLOR);
    else if(tCP[BAY] == AUSTRALIA) GangZoneShowForAll(Zone[BAY], ZONE_AUSTRALIA_COLOR);
    else if(tCP[BAY] == AMERICA) GangZoneShowForAll(Zone[BAY], ZONE_AMERICA_COLOR);
    //------
    if(tCP[BIG] == TEAM_NONE) GangZoneShowForAll(Zone[BIG], -66);
    else if(tCP[BIG] == ASIA) GangZoneShowForAll(Zone[BIG], ZONE_ASIA_COLOR);
    else if(tCP[BIG] == AFRICA) GangZoneShowForAll(Zone[BIG], ZONE_AFRICA_COLOR);
    else if(tCP[BIG] == EUROPE) GangZoneShowForAll(Zone[BIG], ZONE_EUROPE_COLOR);
    else if(tCP[BIG] == AUSTRALIA) GangZoneShowForAll(Zone[BIG], ZONE_AUSTRALIA_COLOR);
    else if(tCP[BIG] == AMERICA) GangZoneShowForAll(Zone[BIG], ZONE_AMERICA_COLOR);
    //------
    if(tCP[ARMY] == TEAM_NONE) GangZoneShowForAll(Zone[ARMY], -66);
    else if(tCP[ARMY] == ASIA) GangZoneShowForAll(Zone[ARMY], ZONE_ASIA_COLOR);
    else if(tCP[ARMY] == AFRICA) GangZoneShowForAll(Zone[ARMY], ZONE_AFRICA_COLOR);
    else if(tCP[ARMY] == EUROPE) GangZoneShowForAll(Zone[ARMY], ZONE_EUROPE_COLOR);
    else if(tCP[ARMY] == AUSTRALIA) GangZoneShowForAll(Zone[ARMY], ZONE_AUSTRALIA_COLOR);
    else if(tCP[ARMY] == AMERICA) GangZoneShowForAll(Zone[ARMY], ZONE_AMERICA_COLOR);
    //------
    if(tCP[PETROL] == TEAM_NONE) GangZoneShowForAll(Zone[PETROL], -66);
    else if(tCP[PETROL] == ASIA) GangZoneShowForAll(Zone[PETROL], ZONE_ASIA_COLOR);
    else if(tCP[PETROL] == AFRICA) GangZoneShowForAll(Zone[PETROL], ZONE_AFRICA_COLOR);
    else if(tCP[PETROL] == EUROPE) GangZoneShowForAll(Zone[PETROL], ZONE_EUROPE_COLOR);
    else if(tCP[PETROL] == AUSTRALIA) GangZoneShowForAll(Zone[PETROL], ZONE_AUSTRALIA_COLOR);
    else if(tCP[PETROL] == AMERICA) GangZoneShowForAll(Zone[PETROL], ZONE_AMERICA_COLOR);
    //------
    if(tCP[OIL] == TEAM_NONE) GangZoneShowForAll(Zone[OIL], -66);
    else if(tCP[OIL] == ASIA) GangZoneShowForAll(Zone[OIL], ZONE_ASIA_COLOR);
    else if(tCP[OIL] == AFRICA) GangZoneShowForAll(Zone[OIL], ZONE_AFRICA_COLOR);
    else if(tCP[OIL] == EUROPE) GangZoneShowForAll(Zone[OIL], ZONE_EUROPE_COLOR);
    else if(tCP[OIL] == AUSTRALIA) GangZoneShowForAll(Zone[OIL], ZONE_AUSTRALIA_COLOR);
    else if(tCP[OIL] == AMERICA) GangZoneShowForAll(Zone[OIL], ZONE_AMERICA_COLOR);
    //------
    if(tCP[DESERT] == TEAM_NONE) GangZoneShowForAll(Zone[DESERT], -66);
    else if(tCP[DESERT] == ASIA) GangZoneShowForAll(Zone[DESERT], ZONE_ASIA_COLOR);
    else if(tCP[DESERT] == AFRICA) GangZoneShowForAll(Zone[DESERT], ZONE_AFRICA_COLOR);
    else if(tCP[DESERT] == EUROPE) GangZoneShowForAll(Zone[DESERT], ZONE_EUROPE_COLOR);
    else if(tCP[DESERT] == AUSTRALIA) GangZoneShowForAll(Zone[DESERT], ZONE_AUSTRALIA_COLOR);
    else if(tCP[DESERT] == AMERICA) GangZoneShowForAll(Zone[DESERT], ZONE_AMERICA_COLOR);
    //------
    if(tCP[QUARRY] == TEAM_NONE) GangZoneShowForAll(Zone[QUARRY], -66);
    else if(tCP[QUARRY] == ASIA) GangZoneShowForAll(Zone[QUARRY], ZONE_ASIA_COLOR);
    else if(tCP[QUARRY] == AFRICA) GangZoneShowForAll(Zone[QUARRY], ZONE_AFRICA_COLOR);
    else if(tCP[QUARRY] == EUROPE) GangZoneShowForAll(Zone[QUARRY], ZONE_EUROPE_COLOR);
    else if(tCP[QUARRY] == AUSTRALIA) GangZoneShowForAll(Zone[QUARRY], ZONE_AUSTRALIA_COLOR);
    else if(tCP[QUARRY] == AMERICA) GangZoneShowForAll(Zone[QUARRY], ZONE_AMERICA_COLOR);
    //------
    if(tCP[GUEST] == TEAM_NONE) GangZoneShowForAll(Zone[GUEST], -66);
    else if(tCP[GUEST] == ASIA) GangZoneShowForAll(Zone[GUEST], ZONE_ASIA_COLOR);
    else if(tCP[GUEST] == AFRICA) GangZoneShowForAll(Zone[GUEST], ZONE_AFRICA_COLOR);
    else if(tCP[GUEST] == EUROPE) GangZoneShowForAll(Zone[GUEST], ZONE_EUROPE_COLOR);
    else if(tCP[GUEST] == AUSTRALIA) GangZoneShowForAll(Zone[GUEST], ZONE_AUSTRALIA_COLOR);
    else if(tCP[GUEST] == AMERICA) GangZoneShowForAll(Zone[GUEST], ZONE_AMERICA_COLOR);
    //------
    if(tCP[EAR] == TEAM_NONE) GangZoneShowForAll(Zone[EAR], -66);
    else if(tCP[EAR] == ASIA) GangZoneShowForAll(Zone[EAR], ZONE_ASIA_COLOR);
    else if(tCP[EAR] == AFRICA) GangZoneShowForAll(Zone[EAR], ZONE_AFRICA_COLOR);
    else if(tCP[EAR] == EUROPE) GangZoneShowForAll(Zone[EAR], ZONE_EUROPE_COLOR);
    else if(tCP[EAR] == AUSTRALIA) GangZoneShowForAll(Zone[EAR], ZONE_AUSTRALIA_COLOR);
    else if(tCP[EAR] == AMERICA) GangZoneShowForAll(Zone[EAR], ZONE_AMERICA_COLOR);
    //-----

    SendClientMessage(playerid, -1, ""COL_WHITE"Stream audio from server MP3 player, Type "COL_GREEN"/Mp3 "COL_WHITE"for music.");

    UpdateTimer[playerid] = KillTimer(UpdateTimer[playerid]);

    if(Captured[playerid][SNAKE] == 0 && IsPlayerCapturing[playerid][SNAKE] == 1)
    { LeavingSnakeFarm(playerid); }
    if(Captured[playerid][BAY] == 0 && IsPlayerCapturing[playerid][BAY] == 1)
    { LeavingBay(playerid); }
    if(Captured[playerid][BIG] == 0 && IsPlayerCapturing[playerid][BIG] == 1)
    { LeavingEar(playerid); }
    if(Captured[playerid][ARMY] == 0 && IsPlayerCapturing[playerid][ARMY] == 1)
    { LeavingArmy(playerid); }
    if(Captured[playerid][PETROL] == 0 && IsPlayerCapturing[playerid][PETROL] == 1)
    { LeavingPetrol(playerid); }
    if(Captured[playerid][OIL] == 0 && IsPlayerCapturing[playerid][OIL] == 1)
    { LeavingOil(playerid); }
    if(Captured[playerid][DESERT] == 0 && IsPlayerCapturing[playerid][DESERT] == 1)
    { LeavingDesert(playerid); }
    if(Captured[playerid][QUARRY] == 0 && IsPlayerCapturing[playerid][QUARRY] == 1)
    { LeavingQuarry(playerid);}
    if(Captured[playerid][GUEST] == 0 && IsPlayerCapturing[playerid][GUEST] == 1)
    { LeavingGuest(playerid);}
    if(Captured[playerid][EAR] == 0 && IsPlayerCapturing[playerid][EAR] == 1)
    { LeavingEar(playerid); }
   
    first_connect[playerid]=1;
    return 1;
}
Reply
#7

Also, that players even take each others score when they login with the players previous id and gets admin level.

Please help me to find it I'll give a good reward.
Reply
#8

Quote:
Originally Posted by TheKevo
Посмотреть сообщение
Also, that players even take each others score when they login with the players previous id and gets admin level.

Please help me to find it I'll give a good reward.
Saving/Loading doesn't seems to be working well. If a player1 with scores and admin level logged out and a player2 logged in he took the score and admin level of player1 right?

Also in OnPlayerDisconnect there is also a problem I guess.

If you think this is gonna be complicated to fix, then time to change your login/register system.
Reply
#9

Yes you;re right, I'll post the OnPlayerDisconnect also. Please help me to fix it? I'll give you a good reward.
Reply
#10

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    RemovePlayerAttachedObject(playerid, 0);
    if(fexist(Path(playerid)))
    {
        new INI:file = INI_Open(Path(playerid));
        INI_SetTag(file,"Player's Data");
        INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
        INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);
        INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
        INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
        INI_WriteInt(file,"Time-Seconds",pInfo[playerid][Seconds]);
        INI_WriteInt(file,"Time-Minutes",pInfo[playerid][Minutes]);
        INI_WriteInt(file,"Time-Hours",pInfo[playerid][Hours]);
        INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);
        INI_WriteInt(file,"Warlord-I",pInfo[playerid][Warlord1]);
        INI_WriteInt(file,"Warlord-II",pInfo[playerid][Warlord2]);
        INI_WriteInt(file,"Warlord-III",pInfo[playerid][Warlord3]);
        INI_Close(file);
    }

    new pFile[35];
    format(pFile, 35, Player_File, GetName(playerid));
    new
    INI:UserFile = INI_Open(pFile);
    INI_WriteInt(UserFile, "Admin", P_Data[playerid][pAdmin]);
    INI_WriteInt(UserFile, "Money", GetPlayerMoney(playerid));
    INI_WriteInt(UserFile, "Score", GetPlayerScore(playerid));
    INI_WriteInt(UserFile, "Skin", P_Data[playerid][pSkin]);
    INI_WriteInt(UserFile, "Warn", P_Data[playerid][pWarn]);
    INI_Close(UserFile);

    if(fexist(Path_2(playerid)))
    {
        new INI:file = INI_Open(Path_2(playerid));
        INI_SetTag(file,"Player Car-Saver Data");

        INI_WriteFloat(file,"(1)Postion-PosX",PositionSaver[playerid][PosX1]);
        INI_WriteFloat(file,"(1)Postion-PosY",PositionSaver[playerid][PosY1]);
        INI_WriteFloat(file,"(1)Postion-PosZ",PositionSaver[playerid][PosZ1]);
        INI_WriteInt(file,"(1)Interior",PositionSaver[playerid][Interior1]);

        INI_WriteFloat(file,"(2)Postion-PosX",PositionSaver[playerid][PosX2]);
        INI_WriteFloat(file,"(2)Postion-PosY",PositionSaver[playerid][PosY2]);
        INI_WriteFloat(file,"(2)Postion-PosZ",PositionSaver[playerid][PosZ2]);
        INI_WriteInt(file,"(2)Interior",PositionSaver[playerid][Interior2]);

        INI_WriteFloat(file,"(3)Postion-PosX",PositionSaver[playerid][PosX3]);
        INI_WriteFloat(file,"(3)Postion-PosY",PositionSaver[playerid][PosY3]);
        INI_WriteFloat(file,"(3)Postion-PosZ",PositionSaver[playerid][PosZ3]);
        INI_WriteInt(file,"(3)Interior",PositionSaver[playerid][Interior3]);

        INI_WriteFloat(file,"(4)Postion-PosX",PositionSaver[playerid][PosX4]);
        INI_WriteFloat(file,"(4)Postion-PosY",PositionSaver[playerid][PosY4]);
        INI_WriteFloat(file,"(4)Postion-PosZ",PositionSaver[playerid][PosZ4]);
        INI_WriteInt(file,"(4)Interior",PositionSaver[playerid][Interior4]);

        INI_WriteFloat(file,"(5)Postion-PosX",PositionSaver[playerid][PosX5]);
        INI_WriteFloat(file,"(5)Postion-PosY",PositionSaver[playerid][PosY5]);
        INI_WriteFloat(file,"(5)Postion-PosZ",PositionSaver[playerid][PosZ5]);
        INI_WriteInt(file,"(5)Interior",PositionSaver[playerid][Interior5]);

        INI_Close(file);
    }
    return 1;
}
Please help me, I'll give +1 rep and a surprise.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)