Jump to content
  • 0

Problema server.


BlonduX

Question

Problema intalnita (descriere):Salut.Daca va puteti uita voi la acest script si sa imi spuneti daca este facut ceva gresit la el ? De la asta pica server dar nu stiu exact de unde. Multumesc.

Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul: 

stock GetFromAccount( dbid, obtaining[], holdingvar[] )
{
    new Query[ 128 ];
    format( Query, sizeof( Query ), "SELECT `%s` FROM `Accounts` WHERE `UserID` = '%d'", obtaining, dbid );
    mysql_query( Query );
    mysql_store_result();

    if( mysql_fetch_row( holdingvar ) == 1 ) { mysql_free_result(); }

    return 1;
}

stock InitPlayerConnection(playerid)
{
    new Query[ 128 ], Name[ MAX_PLAYER_NAME ], EscapedName[ MAX_PLAYER_NAME ];
    GetPlayerName( playerid, Name, sizeof( Name ) );
    mysql_real_escape_string( Name, EscapedName );
	#pragma unused Name
    format( Query, sizeof( Query ), "SELECT `UserID` FROM `Accounts` WHERE `Username` = '%s'", EscapedName );
    mysql_query( Query );
    printf(" SQL: %s",Query);
    mysql_store_result();
    if( mysql_num_rows() > 0 )
	{
        if( mysql_num_rows() > 1 )
		{
		    mysql_free_result();
            Kick( playerid );
        }
        else
		{
			new string[128];
			PlayerInfo[playerid][pDatabaseID] = mysql_fetch_int();
			format(string,sizeof(string),"{FFFFFF}Bine ai revenit, {1E7594}%s{FFFFFF} !nnIntrodu parola in casuta de mai jos", PlayerName(playerid));
            ShowPlayerDialog(playerid,36,DIALOG_STYLE_PASSWORD,"{FFFFFF}Logare{FFFFFF}",string,"Logare","Iesire");
			mysql_free_result();
        }
    }
    else
	{
        mysql_free_result();
        ClearChatbox(playerid, 50);
		SendClientMessage(playerid, COLOR_LIGHTRED, "Acest cont nu este inregistrat !");
		SendClientMessage(playerid, COLOR_LIGHTRED, "Pentru a te inregistra trebuie sa treci testul pe site-ul nostru !");
		SendClientMessage(playerid, COLOR_YELLOW, "Adresa este: www.mo-rp.ro !");
		Kick(playerid);
	}
	return 1;
}

stock LoadAccountVariables( playerid )
{
    if( IsPlayerConnected( playerid ) )
	{
        new DataString[ 1536 ], Query[ 1536 ];
        format( Query, sizeof( Query ), "SELECT * FROM `Accounts` WHERE `UserID` = '%d'", PlayerInfo[playerid][pDatabaseID] );
		if(mysql_query( Query ))
	    {
			mysql_store_result();
		}
		else
		{
		    mysql_free_result();
			Kick(playerid);
		}
        mysql_fetch_field( "Converta", DataString);
		new convert = strval(DataString);
        if(convert != 5) return Kick(playerid);
        mysql_fetch_field( "Cash", DataString);
		SetPVarInt(playerid, "PlayerCash", strval(DataString));
		mysql_fetch_field( "Model", DataString);
		SetPVarInt(playerid, "Model", strval(DataString));
		mysql_fetch_field( "Crash", DataString);
		SetPVarInt(playerid, "Crash", strval(DataString));
		mysql_fetch_field( "LoadPosInt", DataString);
		SetPVarInt(playerid, "Int", strval(DataString));
		mysql_fetch_field( "World", DataString);
		SetPVarInt(playerid, "World", strval(DataString));
		mysql_fetch_field( "PosX", DataString);
		SetPVarFloat(playerid, "PosX", strval(DataString));
		mysql_fetch_field( "PosY", DataString);
		SetPVarFloat(playerid, "PosY", strval(DataString));
		mysql_fetch_field( "PosZ", DataString);
		SetPVarFloat(playerid, "PosZ", strval(DataString));
		mysql_fetch_field( "PayDay", DataString);
		SetPVarInt(playerid, "PayDay", strval(DataString));
		mysql_fetch_field( "PayCheck", DataString);
		SetPVarInt(playerid, "PayCheck", strval(DataString));
		mysql_fetch_field( "Bank", DataString);
		SetPVarInt(playerid, "Bank", strval(DataString));
		mysql_fetch_field( "ConnectTime", DataString);
		SetPVarInt(playerid, "ConnectTime", strval(DataString));
		mysql_fetch_field( "Member", DataString);
		SetPVarInt(playerid, "Member", strval(DataString));
		mysql_fetch_field( "Rank", DataString);
		SetPVarInt(playerid, "Rank", strval(DataString));
		mysql_fetch_field( "Weed", DataString);
		SetPVarInt(playerid, "Weed", strval(DataString));
		mysql_fetch_field( "Crack", DataString);
		SetPVarInt(playerid, "Crack", strval(DataString));
		mysql_fetch_field( "Cocaine", DataString);
		SetPVarInt(playerid, "Cocaine", strval(DataString));
		mysql_fetch_field( "HouseKey", DataString);
		SetPVarInt(playerid, "HouseKey", strval(DataString));
		mysql_fetch_field( "BizKey", DataString);
		SetPVarInt(playerid, "BizzKey", strval(DataString));
		mysql_fetch_field( "CarKey1", DataString);
		SetPVarInt(playerid, "CarKey1", strval(DataString));
		mysql_fetch_field( "CarKey2", DataString);
		SetPVarInt(playerid, "CarKey2", strval(DataString));
		mysql_fetch_field( "CarKey3", DataString);
		SetPVarInt(playerid, "CarKey3", strval(DataString));
		mysql_fetch_field( "Admin", DataString);
        SetPVarInt(playerid, "Admin", strval(DataString));
		mysql_fetch_field( "Tester", DataString);
		SetPVarInt(playerid, "Tester", strval(DataString));
		mysql_fetch_field( "Banned", DataString);
		SetPVarInt(playerid, "Banned", strval(DataString));
		mysql_fetch_field( "Approve", DataString);
		SetPVarInt(playerid, "Approve", strval(DataString));
		mysql_fetch_field( "DrugTime", DataString);
		SetPVarInt(playerid, "DrugTime", strval(DataString));
		mysql_fetch_field( "Weapon0", DataString);
		PlayerInfo[playerid][pWeapon][0] = strval(DataString);
		mysql_fetch_field( "Weapon1", DataString);
		PlayerInfo[playerid][pWeapon][1] = strval(DataString);
		mysql_fetch_field( "Weapon2", DataString);
		PlayerInfo[playerid][pWeapon][2] = strval(DataString);
		mysql_fetch_field( "Weapon3", DataString);
		PlayerInfo[playerid][pWeapon][3] = strval(DataString);
		mysql_fetch_field( "Weapon4", DataString);
		PlayerInfo[playerid][pWeapon][4] = strval(DataString);
		mysql_fetch_field( "Weapon5", DataString);
		PlayerInfo[playerid][pWeapon][5] = strval(DataString);
		mysql_fetch_field( "Weapon6", DataString);
		PlayerInfo[playerid][pWeapon][6] = strval(DataString);
		mysql_fetch_field( "Weapon7", DataString);
		PlayerInfo[playerid][pWeapon][7] = strval(DataString);
		mysql_fetch_field( "Weapon8", DataString);
		PlayerInfo[playerid][pWeapon][8] = strval(DataString);
		mysql_fetch_field( "Weapon9", DataString);
		PlayerInfo[playerid][pWeapon][9] = strval(DataString);
		mysql_fetch_field( "Weapon10", DataString);
		PlayerInfo[playerid][pWeapon][10] = strval(DataString);
		mysql_fetch_field( "Weapon11", DataString);
		PlayerInfo[playerid][pWeapon][11] = strval(DataString);
		mysql_fetch_field( "Weapon12", DataString);
		PlayerInfo[playerid][pWeapon][12] = strval(DataString);
		mysql_fetch_field( "Ammo0", DataString);
		PlayerInfo[playerid][pAmmo][0] = strval(DataString);
		mysql_fetch_field( "Ammo1", DataString);
		PlayerInfo[playerid][pAmmo][1] = strval(DataString);
		mysql_fetch_field( "Ammo2", DataString);
		PlayerInfo[playerid][pAmmo][2] = strval(DataString);
		mysql_fetch_field( "Ammo3", DataString);
		PlayerInfo[playerid][pAmmo][3] = strval(DataString);
		mysql_fetch_field( "Ammo4", DataString);
		PlayerInfo[playerid][pAmmo][4] = strval(DataString);
		mysql_fetch_field( "Ammo5", DataString);
		PlayerInfo[playerid][pAmmo][5] = strval(DataString);
		mysql_fetch_field( "Ammo6", DataString);
		PlayerInfo[playerid][pAmmo][6] = strval(DataString);
		mysql_fetch_field( "Ammo7", DataString);
		PlayerInfo[playerid][pAmmo][7] = strval(DataString);
		mysql_fetch_field( "Ammo8", DataString);
		PlayerInfo[playerid][pAmmo][8] = strval(DataString);
		mysql_fetch_field( "Ammo9", DataString);
		PlayerInfo[playerid][pAmmo][9] = strval(DataString);
		mysql_fetch_field( "Ammo10", DataString);
		PlayerInfo[playerid][pAmmo][10] = strval(DataString);
		mysql_fetch_field( "Ammo11", DataString);
		PlayerInfo[playerid][pAmmo][11] = strval(DataString);
		mysql_fetch_field( "Ammo12", DataString);
		PlayerInfo[playerid][pAmmo][12] = strval(DataString);
		mysql_fetch_field( "HouseEnter", DataString);
		SetPVarInt(playerid, "HouseEnter", strval(DataString));
		mysql_fetch_field( "BizzEnter", DataString);
		SetPVarInt(playerid, "BizzEnter", strval(DataString));
		mysql_fetch_field( "GunLic", DataString);
		SetPVarInt(playerid, "GunLic", strval(DataString));
		mysql_fetch_field( "DriveLic", DataString);
		SetPVarInt(playerid, "DriveLic", strval(DataString));
		mysql_fetch_field( "PhoneNum", DataString);
		SetPVarInt(playerid, "PhoneNum", strval(DataString));
		mysql_fetch_field( "Job", DataString);
		SetPVarInt(playerid, "Job", strval(DataString));
		mysql_fetch_field( "Jailed", DataString);
		SetPVarInt(playerid, "Jailed", strval(DataString));
		mysql_fetch_field( "JailTime", DataString);
		SetPVarInt(playerid, "JailTime", strval(DataString));
		mysql_fetch_field( "WantedLevel", DataString);
		SetPVarInt(playerid, "WantedLevel", strval(DataString));
		mysql_fetch_field( "DonateRank", DataString);
		SetPVarInt(playerid, "DonateRank", strval(DataString));
		mysql_fetch_field( "Mask", DataString);
		SetPVarInt(playerid, "Mask", strval(DataString));
		mysql_fetch_field( "MaskID", DataString);
		SetPVarInt(playerid, "MaskID", strval(DataString));
		mysql_fetch_field( "Cellphone", DataString);
		SetPVarInt(playerid, "Cellphone", strval(DataString));
		mysql_fetch_field( "Crimes", DataString);
		SetPVarInt(playerid, "Crimes", strval(DataString));
		mysql_fetch_field( "Arrest", DataString);
		SetPVarInt(playerid, "Arrest", strval(DataString));
		mysql_fetch_field( "Changes", DataString);
		SetPVarInt(playerid, "Changes", strval(DataString));
		mysql_fetch_field( "Changeage", DataString);
		SetPVarInt(playerid, "Changeage", strval(DataString));
		mysql_fetch_field( "Changesex", DataString);
		SetPVarInt(playerid, "Changesex", strval(DataString));
		mysql_fetch_field( "Sex", DataString);
		SetPVarInt(playerid, "Sex", strval(DataString));
		mysql_fetch_field( "Tutorial", DataString);
		SetPVarInt(playerid, "Tut", strval(DataString));
		mysql_fetch_field( "CarTicket", DataString);
		SetPVarInt(playerid, "CarTicket", strval(DataString));
		mysql_fetch_field( "FightStyle", DataString);
		SetPVarInt(playerid, "FightStyle", strval(DataString));
		mysql_fetch_field( "WalkieTalkie", DataString);
		SetPVarInt(playerid, "WalkieTalkie", strval(DataString));
		mysql_fetch_field( "WalkieFreq", DataString);
		SetPVarInt(playerid, "WalkieFreq", strval(DataString));
		mysql_fetch_field( "Ticket1", DataString);
		PlayerInfo[playerid][pTicket][0] = strval(DataString);
		mysql_fetch_field( "Ticket2", DataString);
		PlayerInfo[playerid][pTicket][1] = strval(DataString);
		mysql_fetch_field( "Ticket3", DataString);
	    PlayerInfo[playerid][pTicket][2] = strval(DataString);
		mysql_fetch_field( "Ticket4", DataString);
		PlayerInfo[playerid][pTicket][3] = strval(DataString);
		mysql_fetch_field( "Ticket5", DataString);
		PlayerInfo[playerid][pTicket][4] = strval(DataString);
		mysql_fetch_field( "Bans", DataString);
		SetPVarInt(playerid, "Bans", strval(DataString));
		mysql_fetch_field( "Kicks", DataString);
		SetPVarInt(playerid, "Kicks", strval(DataString));
		mysql_fetch_field( "Jails", DataString);
		SetPVarInt(playerid, "Jails", strval(DataString));
		mysql_fetch_field( "CheckEarn", DataString);
		SetPVarInt(playerid, "CheckEarn", strval(DataString));
		mysql_fetch_field( "Cigs", DataString);
		SetPVarInt(playerid, "Cigs", strval(DataString));
		mysql_fetch_field( "Lighter", DataString);
		SetPVarInt(playerid, "Lighter", strval(DataString));
		mysql_fetch_field( "Dead", DataString);
		SetPVarInt(playerid, "Dead", strval(DataString));
		mysql_fetch_field( "WalkStyle", DataString);
		SetPVarInt(playerid, "WalkStyle", strval(DataString));
		mysql_fetch_field( "ChatStyle", DataString);
		SetPVarInt(playerid, "ChatStyle", strval(DataString));
		mysql_fetch_field( "Bag", DataString);
		SetPVarInt(playerid, "Bag", strval(DataString));
		mysql_fetch_field( "CellID", DataString);
		SetPVarInt(playerid, "CellID", strval(DataString));
		mysql_fetch_field( "GasCan", DataString);
		SetPVarInt(playerid, "GasCan", strval(DataString));
		mysql_fetch_field( "App", DataString);
		SetPVarInt(playerid, "App", strval(DataString));
		mysql_fetch_field( "InvWeapon", DataString);
		SetPVarInt(playerid, "InvWeapon", strval(DataString));
		mysql_fetch_field( "InvAmmo", DataString);
		SetPVarInt(playerid, "InvAmmo", strval(DataString));
		mysql_fetch_field( "Clothes1", DataString);
		SetPVarInt(playerid, "Clothes1", strval(DataString));
		mysql_fetch_field( "Clothes2", DataString);
		SetPVarInt(playerid, "Clothes2", strval(DataString));
		mysql_fetch_field( "Clothes3", DataString);
		SetPVarInt(playerid, "Clothes3", strval(DataString));
		mysql_fetch_field( "Clothes4", DataString);
		SetPVarInt(playerid, "Clothes4", strval(DataString));
		mysql_fetch_field( "Clothes5", DataString);
		SetPVarInt(playerid, "Clothes5", strval(DataString));
		mysql_fetch_field( "Bait", DataString);
		SetPVarInt(playerid, "Bait", strval(DataString));
		mysql_fetch_field( "FishingRod", DataString);
		SetPVarInt(playerid, "FishingRod", strval(DataString));
		mysql_fetch_field( "FishLine", DataString);
		SetPVarInt(playerid, "FishLine", strval(DataString));
		mysql_fetch_field( "Lazer", DataString);
		SetPVarInt(playerid, "Lazer", strval(DataString));
		mysql_fetch_field( "Duty", DataString);
		SetPVarInt(playerid, "Duty", strval(DataString));
		mysql_fetch_field( "Ciggy", DataString);
		SetPVarInt(playerid, "Ciggy", strval(DataString));
		mysql_fetch_field( "Beer", DataString);
		SetPVarInt(playerid, "Beer", strval(DataString));
		mysql_fetch_field( "Wine", DataString);
		SetPVarInt(playerid, "Wine", strval(DataString));
		mysql_fetch_field( "Motel", DataString);
		SetPVarInt(playerid, "Motel", strval(DataString));
		mysql_fetch_field( "HighType", DataString);
		SetPVarInt(playerid, "HighType", strval(DataString));
		mysql_fetch_field( "HiddenNum", DataString);
		SetPVarInt(playerid, "HiddenNum", strval(DataString));
		mysql_fetch_field( "Crashes", DataString);
		SetPVarInt(playerid, "Crashes", strval(DataString));
		mysql_fetch_field( "BreakKit", DataString);
		SetPVarInt(playerid, "BreakKit", strval(DataString));
		mysql_fetch_field( "RentCar", DataString);
		SetPVarInt(playerid, "RentCar", strval(DataString));
		mysql_fetch_field( "JobCar", DataString);
		SetPVarInt(playerid, "JobCar", strval(DataString));
		mysql_fetch_field( "pdSuspensionDay", DataString);
		PlayerInfo[playerid][pdSuspensionDay]=strval(DataString);
		mysql_fetch_field( "pdSuspensionMonth", DataString);
		PlayerInfo[playerid][pdSuspensionMonth]=strval(DataString);
		mysql_fetch_field( "pdSuspensionYear", DataString);
		PlayerInfo[playerid][pdSuspensionYear]=strval(DataString);
		mysql_fetch_field( "Logs", DataString);
		SetPVarInt(playerid, "Logs", strval(DataString));
		mysql_fetch_field( "Cuffed", DataString);
		SetPVarInt(playerid, "Cuffed", strval(DataString));
		mysql_fetch_field( "CuffedTime", DataString);
		SetPVarInt(playerid, "CuffedTime", strval(DataString));
		mysql_fetch_field( "JobTime", DataString);
		SetPVarInt(playerid, "JobTime", strval(DataString));
		mysql_fetch_field( "Deaths", DataString);
		SetPVarInt(playerid, "Deaths", strval(DataString));
		mysql_fetch_field( "PMMsg", DataString);
		SetPVarInt(playerid, "PMMsg", strval(DataString));
		mysql_fetch_field( "CellCol", DataString);
		SetPVarInt(playerid, "CellCol", strval(DataString));
		mysql_fetch_field( "HudCol", DataString);
		SetPVarInt(playerid, "HudCol", strval(DataString));
		mysql_fetch_field( "HudHide", DataString);
		SetPVarInt(playerid, "HudHide", strval(DataString));
		mysql_fetch_field( "Wound", DataString);
		SetPVarInt(playerid, "Wound", strval(DataString));
		mysql_fetch_field( "Addiction", DataString);
		SetPVarInt(playerid, "Addiction", strval(DataString));
		mysql_fetch_field( "Bail", DataString);
		SetPVarInt(playerid, "Bail", strval(DataString));
		mysql_fetch_field( "LicGuns", DataString);
		SetPVarInt(playerid, "LicGuns", strval(DataString));
		mysql_fetch_field( "LicTime", DataString);
        SetPVarInt(playerid, "LicTime", strval(DataString));
		mysql_fetch_field( "Strikes", DataString);
        SetPVarInt(playerid, "Strikes", strval(DataString));
		mysql_fetch_field( "OOCStats", DataString);
        SetPVarInt(playerid, "OOCStats", strval(DataString));
		mysql_fetch_field( "FactPerm", DataString);
        SetPVarInt(playerid, "FactPerm", strval(DataString));
		mysql_fetch_field( "DuffleBag", DataString);
        SetPVarInt(playerid, "DuffleBag", strval(DataString));
		mysql_fetch_field( "DufMoney", DataString);
        SetPVarInt(playerid, "DufMoney", strval(DataString));
		mysql_fetch_field( "DufWeed", DataString);
        SetPVarInt(playerid, "DufWeed", strval(DataString));
		mysql_fetch_field( "DufCrack", DataString);
        SetPVarInt(playerid, "DufCrack", strval(DataString));
		mysql_fetch_field( "DufCocaine", DataString);
        SetPVarInt(playerid, "DufCocaine", strval(DataString));
		mysql_fetch_field( "DufGun1", DataString);
        SetPVarInt(playerid, "DufGun1", strval(DataString));
		mysql_fetch_field( "DufGun2", DataString);
        SetPVarInt(playerid, "DufGun2", strval(DataString));
		mysql_fetch_field( "DufGun3", DataString);
        SetPVarInt(playerid, "DufGun3", strval(DataString));
		mysql_fetch_field( "DufGun4", DataString);
        SetPVarInt(playerid, "DufGun4", strval(DataString));
		mysql_fetch_field( "DufGunA1", DataString);
        SetPVarInt(playerid, "DufGunA1", strval(DataString));
		mysql_fetch_field( "DufGunA2", DataString);
        SetPVarInt(playerid, "DufGunA2", strval(DataString));
		mysql_fetch_field( "DufGunA3", DataString);
        SetPVarInt(playerid, "DufGunA3", strval(DataString));
		mysql_fetch_field( "DufGunA4", DataString);
        SetPVarInt(playerid, "DufGunA4", strval(DataString));
		mysql_fetch_field( "GunLaw", DataString);
        SetPVarInt(playerid, "GunLaw", strval(DataString));
		mysql_fetch_field( "GunLawT", DataString);
        SetPVarInt(playerid, "GunLawT", strval(DataString));
		mysql_fetch_field( "DrugUsage", DataString);
        SetPVarInt(playerid, "DrugUsage", strval(DataString));
		mysql_fetch_field( "DrugDay", DataString);
        SetPVarInt(playerid, "DrugDay", strval(DataString));
		mysql_fetch_field( "RingNum", DataString);
        SetPVarInt(playerid, "RingNum", strval(DataString));
		mysql_fetch_field( "Raise", DataString);
        SetPVarInt(playerid, "Raise", strval(DataString));
		mysql_fetch_field( "Health", DataString);
		SetPVarFloat(playerid, "Health", strval(DataString));
		mysql_fetch_field( "Armour", DataString);
		SetPVarFloat(playerid, "Armour", strval(DataString));
		mysql_fetch_field( "AdmName", DataString);
		strmid(PlayerInfo[playerid][pAdmName], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Accent", DataString);
		strmid(PlayerInfo[playerid][pAccent], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Describe1", DataString);
		strmid(PlayerInfo[playerid][pDescribe], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Describe2", DataString);
		strmid(PlayerInfo[playerid][pDescribe2], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "BanReason", DataString);
		strmid(PlayerInfo[playerid][pBanReason], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "TicketReason1", DataString);
		strmid(TicketReason[playerid][0], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "TicketReason2", DataString);
		strmid(TicketReason[playerid][1], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "TicketReason3", DataString);
		strmid(TicketReason[playerid][2], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "TicketReason4", DataString);
		strmid(TicketReason[playerid][3], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "TicketReason5", DataString);
		strmid(TicketReason[playerid][4], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Note1", DataString);
		strmid(PlayerInfo[playerid][pNote1], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Note2", DataString);
		strmid(PlayerInfo[playerid][pNote2], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Note3", DataString);
		strmid(PlayerInfo[playerid][pNote3], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Note4", DataString);
		strmid(PlayerInfo[playerid][pNote4], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Note5", DataString);
		strmid(PlayerInfo[playerid][pNote5], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "JailReason", DataString);
		strmid(PlayerInfo[playerid][pJailReason], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Taunt", DataString);
		strmid(PlayerInfo[playerid][pTaunt], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Warning", DataString);
		strmid(PlayerInfo[playerid][pWarning], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "MarriedTo", DataString);
		strmid(PlayerInfo[playerid][pMarriedTo], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Warrant", DataString);
		strmid(PlayerInfo[playerid][pWarrant], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Parole", DataString);
		strmid(PlayerInfo[playerid][pParole], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "MaskT", DataString);
		strmid(PlayerInfo[playerid][pMaskT], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "LBannedBy", DataString);
		strmid(PlayerInfo[playerid][pLBannedBy], DataString, 0, strlen(DataString), 255);
		mysql_fetch_field( "Age", DataString);
		SetPVarInt(playerid, "Age", strval(DataString));
		mysql_fetch_field( "Watch", DataString);
		SetPVarInt(playerid, "Watch", strval(DataString));
		mysql_fetch_field( "IntEnter", DataString);
		SetPVarInt(playerid, "IntEnter", strval(DataString));
		mysql_fetch_field( "JobTura", DataString);
		SetPVarInt(playerid, "JobTura", strval(DataString));
		mysql_fetch_field( "Gunrack", DataString);
        SetPVarInt(playerid, "Gunrack", strval(DataString));
		DeletePVar(playerid,"CameraPos");
		DeletePVar(playerid,"CameraDelay");
		FadeTime[playerid]=0;
	    FadeScreen(playerid, 1);
	    ClearChatbox(playerid,50);
	    SetPVarInt(playerid,"PlayerLogged",2);
	    SetPVarInt(playerid, "AfkMark", 0);
	    if(GetPVarInt(playerid, "Admin") >= 1 && AdminUser(playerid)) ShowPlayerDialog(playerid,140,DIALOG_STYLE_PASSWORD,"Metropolitan Roleplay Admin","Ai la dispozitie 60 secunde sa te loghezi.","Login", "Iesire");
	}
    return 1;
} 
case 36: // Login dialog
		{
		    if(response)
	        {
		            if( strlen( inputtext ) == 0 )
					{
					    SetPVarInt(playerid, "WrongPassword", 1+GetPVarInt(playerid, "WrongPassword"));
					    if(GetPVarInt(playerid, "WrongPassword") >= 3)
						{
							Kick(playerid);
							return 1;
						}
		                ShowPlayerDialog(playerid,36,DIALOG_STYLE_PASSWORD,"{FFFFFF}Parola gresita !{FFFFFF}","{FF6347}Parola introdusa este gresita !nn{FFFFFF}Introduceti parola corecta !","Logare", "Iesire");
		                return 1;
		            }
		            GetFromAccount( PlayerInfo[playerid][pDatabaseID], "Password", PlayerInfo[playerid][pKey]);
		            //Hash(inputtext);
		            if( strcmp( inputtext, PlayerInfo[playerid][pKey], true ) == 0 )
					{
		                LoadAccountVariables( playerid );
		            }
		            else
					{
					    SetPVarInt(playerid, "WrongPassword", 1+GetPVarInt(playerid, "WrongPassword"));
					    if(GetPVarInt(playerid, "WrongPassword") >= 3)
						{
							Kick(playerid);
							return 1;
						}
					    ShowPlayerDialog(playerid,36,DIALOG_STYLE_PASSWORD,"{FFFFFF}Parola gresita !{FFFFFF}","{FF6347}Parola introdusa este gresita !nn{FFFFFF}Introduceti parola corecta !","Logare", "Iesire");
					    return 1;
		            }
	        }
	        else
		 	{
	        	Kick(playerid);
		 	}
		} 

Imagini / Video (optional):
Ati incercat sa rezolvati singur?:

Edited by BlonduX
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

nu apare nimic la Crashdetect. prima data am zis ca este de la versiunea de crashdetect, dar tot asa nu apare nimic.

si nici cu nativechecker.

Daca intru eu singur pe sv merge tot atunci cand mai intra cineva se inchide ii apar butoanele alea cu spawn si <- -> si atat dupa isi da rr.

Daca vreti va dau id meu de skype si va uitati prin el, daca rezolv postez aici rezolvarea.

Link to comment
Share on other sites

  • 0
stock InitPlayerConnection(playerid)
{
    new Query[ 128 ], Name[ MAX_PLAYER_NAME ], EscapedName[ MAX_PLAYER_NAME ];
    GetPlayerName( playerid, Name, sizeof( Name ) );
    mysql_real_escape_string( Name, EscapedName );
	#pragma unused Name
    format( Query, sizeof( Query ), "SELECT `UserID` FROM `Accounts` WHERE `Username` = '%s'", EscapedName );
    mysql_query( Query );
    printf(" SQL: %s",Query);
    mysql_store_result();
    if( mysql_num_rows() > 0 )
	{
        if( mysql_num_rows() > 1 )
		{
		    mysql_free_result();
            Kick( playerid );
        }
        else
		{
			new string[256];
			PlayerInfo[playerid][pDatabaseID] = mysql_fetch_int();
			format(string,sizeof(string),"{FFFFFF}Bine ai revenit, {1E7594}%s{FFFFFF} !nnIntrodu parola in casuta de mai jos", PlayerName(playerid));
            ShowPlayerDialog(playerid,36,DIALOG_STYLE_PASSWORD,"{FFFFFF}Logare{FFFFFF}",string,"Logare","Iesire");
			mysql_free_result();
        }
    }
    else
	{
        mysql_free_result();
        ClearChatbox(playerid, 50);
		SendClientMessage(playerid, COLOR_LIGHTRED, "Acest cont nu este inregistrat !");
		SendClientMessage(playerid, COLOR_LIGHTRED, "Pentru a te inregistra trebuie sa treci testul pe site-ul nostru !");
		SendClientMessage(playerid, COLOR_YELLOW, "Adresa este: www.mo-rp.ro !");
		Kick(playerid);
	}
	return 1;
}

Incearca asta.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.