Weird Problem with my server.
#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


Messages In This Thread
Weird Problem with my server. - by TheKevo - 05.03.2014, 10:33
Re: Weird Problem with my server. - by GalaxyHostFree - 05.03.2014, 10:36
Re: Weird Problem with my server. - by iSkate - 05.03.2014, 10:38
Re: Weird Problem with my server. - by ChristianIvann09 - 05.03.2014, 10:39
Re: Weird Problem with my server. - by HK - 05.03.2014, 10:53
Re: Weird Problem with my server. - by TheKevo - 05.03.2014, 11:00
Re: Weird Problem with my server. - by TheKevo - 05.03.2014, 11:08
Re: Weird Problem with my server. - by GalaxyHostFree - 05.03.2014, 11:18
Re: Weird Problem with my server. - by TheKevo - 05.03.2014, 11:25
Re: Weird Problem with my server. - by TheKevo - 05.03.2014, 12:14

Forum Jump:


Users browsing this thread: 1 Guest(s)