Please help me professional scripters.
#1

Please help me, I've trouble with logging onto my server. When I put my password it won't allow me to spawn it disconnects me from the server but it do not appear on the screen. Also If i set a player 1 as admin and if another player 2 log on with same id get's the same score and admin level. Please help me to solve it. I'll reward you a +1 rep and I'll pay you some cash if possible. If you want I can give developer rank on my server (It's hosted tab with good playerbase)

Btw here are my script for OnPlayerConnect

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;
}
Here's is my OnPlayerDisconnect
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 to solve it. I'll reward you with +1 cash and if it worked I'll pay you some cash too. If you want I'll make you server developer of my community (It's hosted tab with decent player base) have a nice day.
Reply
#2

Please help me, Sorry for bumping it.
Reply
#3

You have too set the player's adminlevel to 0 in the registration dialog like this pInfo[playerid][Adminlevel] = 0; as for the password problem i will need the login dialog for that copy it and paste it here with pawn tags.
Reply
#4

Set all things to 0 on connect so they wont get the same things.
Reply
#5

On player connect set everything to 0 and they wont get the same
Reply
#6

Why would he set everything to 0 on connect? he would fuck up all the variables all the saved stuff would go zero.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)