Jump to content
  • 0

Problema mysql log


Sprite_RoPlayers

Question

Buna seara am si problema asta in mysql log

[23:05:59] [ERROR] CMySQLQuery::Execute[()] - (error #1146) Table 'spritetv.garages' doesn't exist
[23:08:06] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[23:08:28] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'Security' in 'field list'
[23:08:28] [ERROR] CMySQLQuery::Create - no query and orm object specified
[23:08:50] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'pHealth' in 'field list'
[23:08:55] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'pHealth' in 'field list'
[23:09:39] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'Security' in 'field list'
[23:09:39] [ERROR] CMySQLQuery::Create - no query and orm object specified

Si chiar nu stiu sa le rezolv nu imi pot da seama de la ce este.

Folosesc gm-ul lui @SkillZ_IT.
 

Link to comment
Share on other sites

21 answers to this question

Recommended Posts

  • 0

Iti spune exact ce inseamna:

 

Table 'spritetv.garages' doesn't exist

- Pentru asta trebuie sa faci un tabel cu numele garages

Unknown column 'pHealth' in 'field list'

- Adauga variabila pHealth in tabelul 'users' ca FLOAT

Unknown column 'Security' in 'field list'

- Adauga variabila Security in tabelul `users` ca VARCHAR

 

Desi eu am impresia ca aceste variabile nu mai sunt folosite in gamemode pentru ca Security este o variabila de la burnedul oferit de edison care a fost scos de majoritatea celor care il foloseau si pHealth nu stiu daca este folosit in gamemode insa nu o sa afecteze semnificativ gamemodeul din punct de vedere al optimizarii

Link to comment
Share on other sites

  • 0
Acum 15 minute, CTMBeast a spus:

Iti spune exact ce inseamna:

 

Table 'spritetv.garages' doesn't exist

- Pentru asta trebuie sa faci un tabel cu numele garages

Unknown column 'pHealth' in 'field list'

- Adauga variabila pHealth in tabelul 'users' ca FLOAT

Unknown column 'Security' in 'field list'

- Adauga variabila Security in tabelul `users` ca VARCHAR

 

 Desi eu am impresia ca aceste variabile nu mai sunt folosite in gamemode pentru ca Security este o variabila de la burnedul oferit de edison care a fost scos de majoritatea celor care il foloseau si pHealth nu stiu daca este folosit in gamemode insa nu o sa afecteze semnificativ gamemodeul din punct de vedere al optimizarii

@CTMBeast

am adaugat phealth in baza de date la users

dar security nu pot adauga

http://prntscr.com/m3uisn

iar la garages

am deja tabelul 

http://prntscr.com/m3ujcl

Si primesc urmatoarea in servar log

[23:39:16] [MySQL] Dealership models: 89
[23:39:17] [debug] Run time error 4: "Array index out of bounds"
[23:39:17] [debug]  Accessing element at index 10 past array upper bound 9
[23:39:17] [debug] AMX backtrace:
[23:39:17] [debug] #0 003423d4 in public LoadGarages () from gmm.amx
[23:39:17] Accesory loaded: 100

Link to comment
Share on other sites

  • 0
Acum 23 minute, CTMBeast a spus:

poti sa imi arati variabila de la garaje? Ex: GarageInfo etc

Cat la Security am impresia ca trebuie sa ii setezi lungimea neaparat pentru ca e Varchar

 

[00:36:01] Server: hosted
[00:36:01] Server vehicles: 170
[00:36:01] Safezones: 14
[00:36:01] [debug] Run time error 4: "Array index out of bounds"
[00:36:01] [debug]  Accessing element at index 100 past array upper bound 99
[00:36:01] [debug] AMX backtrace:
[00:36:01] [debug] #0 00296c34 in public LoadProperty () from gmm.amx
[00:36:01] [debug] #1 000b5008 in ?? () from gmm.amx
[00:36:01] [debug] #2 00028b30 in public L_AFK_OnGM () from gmm.amx
[00:36:01] [debug] #3 native CallLocalFunction () from samp03svr
[00:36:01] [debug] #4 00018b40 in public SSCANF_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #5 00012ef0 in public Itter_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #6 native CallLocalFunction () from samp03svr
[00:36:01] [debug] #7 00011f40 in public ScriptInit_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #8 00010ec4 in public PZone_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #9 native CallLocalFunction () from samp03svr
[00:36:01] [debug] #10 00006b28 in public OnGameModeInit () from gmm.amx
[00:36:01] Number of vehicle models: 65
[00:36:02] [debug] Run time error 4: "Array index out of bounds"
[00:36:02] [debug]  Accessing element at index 10 past array upper bound 9
[00:36:02] [debug] AMX backtrace:
[00:36:02] [debug] #0 003423d4 in public LoadGarages () from gmm.amx
[00:36:02] Accesory loaded: 100

acu primesc astea :(

Link to comment
Share on other sites

  • 0
Just now, Sprite_RoPlayers said:
[00:36:01] Server: hosted
[00:36:01] Server vehicles: 170
[00:36:01] Safezones: 14
[00:36:01] [debug] Run time error 4: "Array index out of bounds"
[00:36:01] [debug]  Accessing element at index 100 past array upper bound 99
[00:36:01] [debug] AMX backtrace:
[00:36:01] [debug] #0 00296c34 in public LoadProperty () from gmm.amx
[00:36:01] [debug] #1 000b5008 in ?? () from gmm.amx
[00:36:01] [debug] #2 00028b30 in public L_AFK_OnGM () from gmm.amx
[00:36:01] [debug] #3 native CallLocalFunction () from samp03svr
[00:36:01] [debug] #4 00018b40 in public SSCANF_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #5 00012ef0 in public Itter_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #6 native CallLocalFunction () from samp03svr
[00:36:01] [debug] #7 00011f40 in public ScriptInit_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #8 00010ec4 in public PZone_OnGameModeInit () from gmm.amx
[00:36:01] [debug] #9 native CallLocalFunction () from samp03svr
[00:36:01] [debug] #10 00006b28 in public OnGameModeInit () from gmm.amx
[00:36:01] Number of vehicle models: 65
[00:36:02] [debug] Run time error 4: "Array index out of bounds"
[00:36:02] [debug]  Accessing element at index 10 past array upper bound 9
[00:36:02] [debug] AMX backtrace:
[00:36:02] [debug] #0 003423d4 in public LoadGarages () from gmm.amx
[00:36:02] Accesory loaded: 100

acu primesc astea :(

Arata-mi functia LoadGarages()

Link to comment
Share on other sites

  • 0
Acum 2 minute, CTMBeast a spus:

Arata-mi functia LoadGarages()

function LoadGarages() {
	new Cache: db = mysql_query(SQL, "SELECT * FROM `garages`");
	new x, result[126];
 	for(new i, j = cache_get_row_count (); i != j; ++i) {
	    garages ++;
       	cache_get_field_content(i, "ID", result); x = strval(result), garageInfo[garages][gID] = x;
       	cache_get_field_content(i, "Owner", result); format(garageInfo[x][gOwner], 32, result);
     	cache_get_field_content(i, "UserID", result); garageInfo[x][gUserID] = strval(result);
		cache_get_field_content(i, "Price", result); garageInfo[x][gPrice] = strval(result);

        garageInfo[x][gPos][0] = cache_get_field_content_float(i, "X"); 
       	garageInfo[x][gPos][1] = cache_get_field_content_float(i, "Y");
       	garageInfo[x][gPos][2] = cache_get_field_content_float(i, "Z"); 
		garageInfo[x][gAngle] = cache_get_field_content_float(i, "Angle"); 

       	garageInfo[x][gVirtualID] = x;    

       	garageInfo[x][gPickup] = CreateDynamicPickup(1277, 23, garageInfo[x][gPos][0], garageInfo[x][gPos][1], garageInfo[x][gPos][2]);
       	garage_label(x); 	
	}
	printf("Garages loaded: %d", garages);
	cache_delete(db);
	return 1;
}

 

Link to comment
Share on other sites

  • 0
Acum 3 minute, CTMBeast a spus:

Du-te la garageInfo si schimba prima valoare dintre paranteze. Exemplu:

- Sa zicem ca ai

new garageInfo[10][gInfo];

 - Schimba in 

new garageInfo[60][gInfo]

In loc de 60 poti sa pui cate case ai tu

dar eu nu am in garage.inc new garage info wtf

am doar asta

http://prntscr.com/m3uwps

Link to comment
Share on other sites

  • 0
Acum 9 minute, CTMBeast a spus:

Atunci cauta #define MAX_GARAGES si schimba acolo numarul

Acu am rezolvat asta dar acu am astea @CTMBeast

[00:49:57] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[00:50:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[00:50:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[00:50:30] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'pHealth' in 'field list'
[00:50:34] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'pHealth' in 'field list'
[00:51:41] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'Security' in 'field list'
[00:51:41] [ERROR] CMySQLQuery::Create - no query and orm object specified
[00:52:07] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'Security' in 'field list'
[00:52:07] [ERROR] CMySQLQuery::Create - no query and orm object specified
[00:58:27] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')

 

Edited by Sprite_RoPlayers
Link to comment
Share on other sites

  • 0
Acum 13 minute, Sprite_RoPlayers a spus:

Acu am rezolvat asta dar acu am astea @CTMBeast

[00:49:57] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[00:50:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[00:50:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[00:50:30] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'pHealth' in 'field list'
[00:50:34] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'pHealth' in 'field list'
[00:51:41] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'Security' in 'field list'
[00:51:41] [ERROR] CMySQLQuery::Create - no query and orm object specified
[00:52:07] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'Security' in 'field list'
[00:52:07] [ERROR] CMySQLQuery::Create - no query and orm object specified
[00:58:27] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')

 

@CTMBeast

Link to comment
Share on other sites

  • 0
00:52:07] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column '---' in 'field list' 

 

Inseamna ca in baza de date nu ai coloana respectiva, intri in phpmyadmin si o faci... 

Link to comment
Share on other sites

  • 0
Acum 12 ore, VeLo a spus:
00:52:07] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column '---' in 'field list' 

 

Inseamna ca in baza de date nu ai coloana respectiva, intri in phpmyadmin si o faci... 

@CTMBeast

Am rezolvat aceasta eroare cu phealt si securty iam pus vachard 75 cred ca ii k 

Si acu am astea 

[16:23:11] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')

 

Link to comment
Share on other sites

  • 0
5 minutes ago, Sprite_RoPlayers said:

@CTMBeast

Am rezolvat aceasta eroare cu phealt si securty iam pus vachard 75 cred ca ii k 

Si acu am astea 

[16:23:11] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')

 

Inseamna ca nu se incarca undeva o variabila.. Verifica cand se intampla asta.. De exemplu daca iti da eroarea dupa ce te-ai logat inseamna ca e de la OnPlayerLogin

Link to comment
Share on other sites

  • 0
Acum 2 ore, CTMBeast a spus:

Inseamna ca nu se incarca undeva o variabila.. Verifica cand se intampla asta.. De exemplu daca iti da eroarea dupa ce te-ai logat inseamna ca e de la OnPlayerLogin

Da fix dupa ce dau login imi apare

function OnPlayerLoginIn(playerid,password[]) {
	new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    new qstr[100];
    new result[456];
    format(qstr,100,"SELECT * FROM users WHERE `name`='%s' AND `password`='%s'",playername2,password);
    mysql_query(SQL,qstr);
    mysql_store_result();	
    if(mysql_num_rows() > 0) {
      	if(mysql_retrieve_row()) {
			GameTextForPlayer(playerid, "~r~Loading account...", 20000, 4);
			PlayerTextdraws(playerid);
	
    		mysql_fetch_field_row(result,"password"); format(PlayerInfo[playerid][pKey], 128, result);

    		mysql_fetch_field_row(result,"SpinPoints"); PlayerInfo[playerid][pSpinPoints] = strval(result);


            mysql_fetch_field_row(result,"PetName"); format(PlayerInfo[playerid][pPetName], 100, result);
            mysql_fetch_field_row(result,"Case"); format(PlayerInfo[playerid][pCase], 100, result);
            mysql_fetch_field_row(result,"CaseKey"); format(PlayerInfo[playerid][pCaseKey], 100, result);


			mysql_fetch_field_row(result,"Level"); PlayerInfo[playerid][pLevel] = strval( result );
			mysql_fetch_field_row(result,"Admin"); PlayerInfo[playerid][pAdmin] = strval( result );
			mysql_fetch_field_row(result,"CarieraSkill"); PlayerInfo[playerid][pCarieraSkill] = strval( result );
			mysql_fetch_field_row(result,"GroparSkill"); PlayerInfo[playerid][pGroparSkill] = strval( result );	
			mysql_fetch_field_row(result,"Backpack"); PlayerInfo[playerid][pBackpack] = strval( result );	
			mysql_fetch_field_row(result,"Propose"); format(PlayerInfo[playerid][pPropose], 64, result);

			mysql_fetch_field_row(result,"ShowProgress1"); PlayerInfo[playerid][pShowProgress][0] = strval( result );	
			mysql_fetch_field_row(result,"ShowProgress2"); PlayerInfo[playerid][pShowProgress][1] = strval( result );
			
			
			SetPVarInt(playerid, "AdminLevel", PlayerInfo[playerid][pAdmin]);

			mysql_fetch_field_row(result,"PetLevel"); PlayerInfo[playerid][pPetLevel] = strval( result );
			mysql_fetch_field_row(result,"PetPoints"); PlayerInfo[playerid][pPetPoints] = strval( result );
			mysql_fetch_field_row(result,"PetStatus"); PlayerInfo[playerid][pPetStatus] = strval( result );
			mysql_fetch_field_row(result,"Pet"); PlayerInfo[playerid][pPet] = strval( result );
		
			mysql_fetch_field_row(result,"DM"); PlayerInfo[playerid][pDM] = strval( result );
			mysql_fetch_field_row(result,"Vip"); PlayerInfo[playerid][pVip] = strval( result );
			mysql_fetch_field_row(result,"Helper"); PlayerInfo[playerid][pHelper] = strval( result );
			mysql_fetch_field_row(result,"Premium"); PlayerInfo[playerid][pPremiumAccount] = strval( result );
			mysql_fetch_field_row(result,"ConnectedTime"); PlayerInfo[playerid][pConnectTime] = floatstr( result );
			mysql_fetch_field_row(result,"Registered"); PlayerInfo[playerid][pReg] = strval( result );
			mysql_fetch_field_row(result,"Sex"); PlayerInfo[playerid][pSex] = strval( result );
			mysql_fetch_field_row(result,"Age"); PlayerInfo[playerid][pAge] = strval( result );
			mysql_fetch_field_row(result,"Muted"); PlayerInfo[playerid][pMuted] = strval( result );
			mysql_fetch_field_row(result,"MuteTime"); PlayerInfo[playerid][pMuteTime] = strval( result );
			mysql_fetch_field_row(result,"Respect"); PlayerInfo[playerid][pExp] = strval( result );
			mysql_fetch_field_row(result,"Money"); PlayerInfo[playerid][pCash] = strval( result );
			mysql_fetch_field_row(result,"Bank"); PlayerInfo[playerid][pAccount] = strval( result );
			mysql_fetch_field_row(result,"Crimes"); PlayerInfo[playerid][pCrimes] = strval( result );
			mysql_fetch_field_row(result,"Kills"); PlayerInfo[playerid][pKills] = strval( result );
			mysql_fetch_field_row(result,"Deaths"); PlayerInfo[playerid][pDeaths] = strval( result );
			mysql_fetch_field_row(result,"Arrested"); PlayerInfo[playerid][pArrested] = strval( result );
			mysql_fetch_field_row(result,"WantedDeaths"); PlayerInfo[playerid][pWantedDeaths] = strval( result );
			mysql_fetch_field_row(result,"Phonebook"); PlayerInfo[playerid][pPhoneBook] = strval( result );
			mysql_fetch_field_row(result,"LottoNr"); PlayerInfo[playerid][pLottoNr] = strval( result );
			mysql_fetch_field_row(result,"WantedLevel"); PlayerInfo[playerid][pWantedLevel] = strval( result );
			mysql_fetch_field_row(result,"Fishes"); PlayerInfo[playerid][pFishes] = strval( result );
			mysql_fetch_field_row(result,"RFishes"); PlayerInfo[playerid][pRFishes] = strval( result );
			mysql_fetch_field_row(result,"Job"); PlayerInfo[playerid][pJob] = strval( result );
			mysql_fetch_field_row(result,"Paycheck"); PlayerInfo[playerid][pPayCheck] = strval( result );
			mysql_fetch_field_row(result,"HeadValue"); PlayerInfo[playerid][pHeadValue] = strval( result );
			mysql_fetch_field_row(result,"Jailed"); PlayerInfo[playerid][pJailed] = strval( result );
			mysql_fetch_field_row(result,"JailTime"); PlayerInfo[playerid][pJailTime] = strval( result );
			mysql_fetch_field_row(result,"Materials"); PlayerInfo[playerid][pMats] = strval( result );
			mysql_fetch_field_row(result,"Drugs"); PlayerInfo[playerid][pDrugs] = strval( result );
			mysql_fetch_field_row(result,"Leader"); PlayerInfo[playerid][pLeader] = strval( result );
			mysql_fetch_field_row(result,"Member"); PlayerInfo[playerid][pMember] = strval( result );
			mysql_fetch_field_row(result,"Rank"); PlayerInfo[playerid][pRank] = strval( result );
			mysql_fetch_field_row(result,"CChar"); PlayerInfo[playerid][pChar] = strval( result );
			mysql_fetch_field_row(result,"FWarn"); PlayerInfo[playerid][pFACWarns] = strval( result );
			mysql_fetch_field_row(result,"FPunish"); PlayerInfo[playerid][pFpunish] = strval( result );
			mysql_fetch_field_row(result,"Acceptpoints"); PlayerInfo[playerid][pLawyer] = strval( result );
			mysql_fetch_field_row(result,"SexSkill"); PlayerInfo[playerid][pSexSkill] = strval( result );
			mysql_fetch_field_row(result,"LawSkill"); PlayerInfo[playerid][pLawSkill] = strval( result );
			mysql_fetch_field_row(result,"MechSkill"); PlayerInfo[playerid][pMechSkill] = strval( result );
			mysql_fetch_field_row(result,"NewsSkill"); PlayerInfo[playerid][pNewsSkill] = strval( result );
			mysql_fetch_field_row(result,"DrugsSkill"); PlayerInfo[playerid][pDrugsSkill] = strval( result );
			mysql_fetch_field_row(result,"MowerSkill"); PlayerInfo[playerid][pWoodSkill] = strval( result );
			mysql_fetch_field_row(result,"StivuitorSkill"); PlayerInfo[playerid][pStivuitorSkill] = strval( result );
			mysql_fetch_field_row(result,"TruckerSkill"); PlayerInfo[playerid][pTruckerSkill] = strval( result );
			mysql_fetch_field_row(result,"IceSkill"); PlayerInfo[playerid][pJackerSkill] = strval( result );
			mysql_fetch_field_row(result,"GarbageSkill"); PlayerInfo[playerid][pGarbageSkill] = strval( result );
			mysql_fetch_field_row(result,"FarmerSkill"); PlayerInfo[playerid][pFarmerSkill] = strval( result );
			mysql_fetch_field_row(result,"FishSkill"); PlayerInfo[playerid][pFishSkill] = strval( result );
			mysql_fetch_field_row(result,"MatSkill"); PlayerInfo[playerid][pMatSkill] = strval( result );
			mysql_fetch_field_row(result,"RobSkill"); PlayerInfo[playerid][pRobSkill] = strval( result );
	        mysql_fetch_field_row(result,"pHealth"); PlayerInfo[playerid][pHealth] = floatstr( result );
	        mysql_fetch_field_row(result,"Inter"); PlayerInfo[playerid][pInt] = strval( result );
	        mysql_fetch_field_row(result,"Local"); PlayerInfo[playerid][pLocal] = strval( result );
	        mysql_fetch_field_row(result,"Team"); PlayerInfo[playerid][pTeam] = strval( result );
	        mysql_fetch_field_row(result,"Model"); PlayerInfo[playerid][pModel] = strval( result );
	        mysql_fetch_field_row(result,"PhoneNr"); PlayerInfo[playerid][pPhone] = strval( result );
	        mysql_fetch_field_row(result,"House"); PlayerInfo[playerid][pHouse] = strval( result );
	        mysql_fetch_field_row(result,"Bizz"); PlayerInfo[playerid][pBizz] = strval( result );
	        mysql_fetch_field_row(result,"Rob"); PlayerInfo[playerid][pRob] = strval( result );
	        mysql_fetch_field_row(result,"CarLicT"); PlayerInfo[playerid][pCarLicT] = strval( result );
	        mysql_fetch_field_row(result,"CarLic"); PlayerInfo[playerid][pCarLic] = strval( result );
	        mysql_fetch_field_row(result,"FlyLicT"); PlayerInfo[playerid][pFlyLicT] = strval( result );
	        mysql_fetch_field_row(result,"FlyLic"); PlayerInfo[playerid][pFlyLic] = strval( result );
	        mysql_fetch_field_row(result,"BoatLicT"); PlayerInfo[playerid][pBoatLicT] = strval( result );
	        mysql_fetch_field_row(result,"BoatLic"); PlayerInfo[playerid][pBoatLic] = strval( result );
	        mysql_fetch_field_row(result,"FishLicT"); PlayerInfo[playerid][pFishLicT] = strval( result );
	        mysql_fetch_field_row(result,"FishLic"); PlayerInfo[playerid][pFishLic] = strval( result );
	        mysql_fetch_field_row(result,"GunLicT"); PlayerInfo[playerid][pGunLicT] = strval( result );
	        mysql_fetch_field_row(result,"GunLic"); PlayerInfo[playerid][pGunLic] = strval( result );
	        mysql_fetch_field_row(result,"PayDay"); PlayerInfo[playerid][pPayDay] = strval( result );
	        mysql_fetch_field_row(result,"PayDayHad"); PlayerInfo[playerid][pPayDayHad] = strval( result );
	        mysql_fetch_field_row(result,"Tutorial"); PlayerInfo[playerid][pTut] = strval( result );
	        mysql_fetch_field_row(result,"Warnings"); PlayerInfo[playerid][pWarns] = strval( result );
	        mysql_fetch_field_row(result,"Rented"); PlayerInfo[playerid][pRented] = strval( result );
	        mysql_fetch_field_row(result,"Fuel"); PlayerInfo[playerid][pFuel] = strval( result );
	        mysql_fetch_field_row(result,"Married"); PlayerInfo[playerid][pMarried] = strval( result );
	        mysql_fetch_field_row(result,"MarriedTo"); strmid(PlayerInfo[playerid][pMarriedTo], result, 0, strlen(result), 255);
	        mysql_fetch_field_row(result,"WTalkie"); PlayerInfo[playerid][pWTalkie] = strval( result );
	        mysql_fetch_field_row(result,"Lighter"); PlayerInfo[playerid][pLighter] = strval( result );
	        mysql_fetch_field_row(result,"Cigarettes"); PlayerInfo[playerid][pCigarettes] = strval( result );
			mysql_fetch_field_row(result,"Email"); strmid(PlayerInfo[playerid][pEmail], result, 0, strlen(result), 255);
			mysql_fetch_field_row(result,"RegisterDate"); strmid(PlayerInfo[playerid][pRegistredDate], result, 0, strlen(result), 255);
	        mysql_fetch_field_row(result,"Banned"); PlayerInfo[playerid][pBanned] = strval( result );
            mysql_fetch_field_row(result,"Radio2"); PlayerInfo[playerid][pMP3] = strval( result );
            mysql_fetch_field_row(result,"HitT"); PlayerInfo[playerid][pHitT] = strval( result );
            mysql_fetch_field_row(result,"CRank"); PlayerInfo[playerid][pCRank] = strval( result );
			mysql_fetch_field_row(result,"WantedTime"); WantedTime[playerid] = strval( result );
			
			
			//mysql_fetch_field_row(result,"Phone"); PlayerInfo[playerid][pPhone] = strval( result );
			mysql_fetch_field_row(result,"id"); PlayerInfo[playerid][pSQLID] = strval( result );
		
		
			mysql_fetch_field_row(result,"WarTurf"); new turf = strval( result );
            mysql_fetch_field_row(result,"WarKills"); ucideri[playerid][turf] = strval( result );
			mysql_fetch_field_row(result,"WarDeaths"); decese[playerid][turf] = strval( result );
			WarKills[playerid] = ucideri[playerid][turf];
			WarDeaths[playerid] = decese[playerid][turf];
						
			mysql_fetch_field_row(result,"Referral"); PlayerInfo[playerid][pReferral] = strval( result );
			mysql_fetch_field_row(result,"ReferralRP"); PlayerInfo[playerid][pReferralRP] = strval( result );
			mysql_fetch_field_row(result,"ReferralMoney"); PlayerInfo[playerid][pReferralMoney] = strval( result );
				
			mysql_fetch_field_row(result,"referralp"); PlayerInfo[playerid][pReferralP] = strval( result );

            mysql_fetch_field_row(result,"Victim"); strmid(PlayerInfo[playerid][pVictim], result, 0, strlen(result), 255);
            mysql_fetch_field_row(result,"Accused"); strmid(PlayerInfo[playerid][pAccused], result, 0, strlen(result), 255);
			mysql_fetch_field_row(result,"Crime1"); strmid(PlayerInfo[playerid][pCrime1], result, 0, strlen(result), 255);
			mysql_fetch_field_row(result,"Crime2"); strmid(PlayerInfo[playerid][pCrime2], result, 0, strlen(result), 255);
			mysql_fetch_field_row(result,"Crime3"); strmid(PlayerInfo[playerid][pCrime3], result, 0, strlen(result), 255);
			mysql_fetch_field_row(result,"BTemp"); PlayerInfo[playerid][pBTemp] = strval( result );
			mysql_fetch_field_row(result,"BYear"); PlayerInfo[playerid][pBYear] = strval( result );
			mysql_fetch_field_row(result,"BMonth"); PlayerInfo[playerid][pBMonth] = strval( result );
			mysql_fetch_field_row(result,"BDay"); PlayerInfo[playerid][pBDay] = strval( result );
			mysql_fetch_field_row(result,"BBy"); strmid(PlayerInfo[playerid][pBBy], result, 0, strlen(result), 255);
			mysql_fetch_field_row(result,"BReason"); strmid(PlayerInfo[playerid][pBReason], result, 0, strlen(result), 255);
			mysql_fetch_field_row(result,"ALeader"); PlayerInfo[playerid][pALeader] = strval( result );

			mysql_fetch_field_row(result,"ShowJob"); PlayerInfo[playerid][pShowJob] = strval( result );
			mysql_fetch_field_row(result,"GiftPoints"); PlayerInfo[playerid][pGiftPoints] = strval( result );
			mysql_fetch_field_row(result,"NewbieMute"); PlayerInfo[playerid][pNewbieMute] = strval( result );
			mysql_fetch_field_row(result,"ReportTime"); PlayerInfo[playerid][pReportTime] = strval( result );
			mysql_fetch_field_row(result, "WTChannel"); WTChannel[playerid] = strval( result );

			mysql_fetch_field_row(result,"HelpedPlayers"); PlayerInfo[playerid][pHelpedPlayers] = strval( result );
			mysql_fetch_field_row(result,"HelpedPlayersToday"); PlayerInfo[playerid][pHelpedPlayersToday] = strval( result );
			mysql_fetch_field_row(result,"ShowFP"); PlayerInfo[playerid][pShowFP] = strval( result );
			mysql_fetch_field_row(result,"ShowLogo"); PlayerInfo[playerid][pShowLogo] = strval( result );
			mysql_fetch_field_row(result,"ShowCeas"); PlayerInfo[playerid][pShowCeas] = strval( result );

			mysql_fetch_field_row(result,"GoldPoints"); PlayerInfo[playerid][pPremiumPoints] = strval( result );
		
			// tog
			NewbieChat[playerid] = cache_get_field_content_int(0, "NewbieChat", SQL);
			toglc[playerid] = cache_get_field_content_int(0, "TogLC", SQL);
			gFam[playerid] = cache_get_field_content_int(0, "TogFC", SQL);
			WTToggle[playerid] = cache_get_field_content_int(0, "TogWT", SQL);
			HidePM[playerid] = cache_get_field_content_int(0, "HidePM", SQL);
			gNews[playerid] = cache_get_field_content_int(0, "TogNews", SQL);
			toglicitatie[playerid] = cache_get_field_content_int(0, "TogLicitatie", SQL);
			togclan[playerid] = cache_get_field_content_int(0, "TogClan", SQL);
			togvip[playerid] = cache_get_field_content_int(0, "TogVip", SQL);
			togevent[playerid] = cache_get_field_content_int(0, "TogEvent", SQL);
			togding[playerid] = cache_get_field_content_int(0, "TogDing", SQL);
			togsurf[playerid] = cache_get_field_content_int(0, "TogSurf", SQL);			
			tograport[playerid] = cache_get_field_content_int(0, "TogRaport", SQL);
			togalert[playerid] = cache_get_field_content_int(0, "TogAlert", SQL);
			togjob[playerid] = cache_get_field_content_int(0, "TogJob", SQL);		
			togfind[playerid] = cache_get_field_content_int(0, "TogFind", SQL);
			PhoneOnline[playerid] = cache_get_field_content_int(0, "PhoneOnline", SQL);

			mysql_fetch_field_row(result,"Clan"); PlayerInfo[playerid][pClan] = strval( result );
			mysql_fetch_field_row(result,"Tag"); PlayerInfo[playerid][pTag] = strval( result );
			
			mysql_fetch_field_row(result,"ClanRank"); PlayerInfo[playerid][pClanRank] = strval( result );
			mysql_fetch_field_row(result,"ClanWarn"); PlayerInfo[playerid][pClanWarn] = strval( result );
			mysql_fetch_field_row(result,"ClanDays"); PlayerInfo[playerid][pClanDays] = strval( result );
																
			mysql_fetch_field_row(result,"InvalidCommands"); PlayerInfo[playerid][pInvalidCommands] = strval( result );			
			mysql_fetch_field_row(result,"Commands"); PlayerInfo[playerid][pCommands][0] = strval( result );
			mysql_fetch_field_row(result,"Commands2"); PlayerInfo[playerid][pCommands][1] = strval( result );
			mysql_fetch_field_row(result,"Commands3"); PlayerInfo[playerid][pCommands][2] = strval( result );
			mysql_fetch_field_row(result,"Commands4"); PlayerInfo[playerid][pCommands][3] = strval( result );
			mysql_fetch_field_row(result,"Commands5"); PlayerInfo[playerid][pCommands][4] = strval( result );

			if(SpecialWeek == 1) {
				new questsvar[1028];
				cache_get_field_content(0, "SpecialQuest", result); format(questsvar, 256, result);
				sscanf(questsvar, "p<|>iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii", 
				PlayerInfo[playerid][pSpecialQuest][0], PlayerInfo[playerid][pSpecialQuest][1], PlayerInfo[playerid][pSpecialQuest][2], PlayerInfo[playerid][pSpecialQuest][3], PlayerInfo[playerid][pSpecialQuest][4],
				PlayerInfo[playerid][pSpecialQuest][5], PlayerInfo[playerid][pSpecialQuest][6], PlayerInfo[playerid][pSpecialQuest][7], PlayerInfo[playerid][pSpecialQuest][8], PlayerInfo[playerid][pSpecialQuest][9],
				PlayerInfo[playerid][pSpecialQuest][10], PlayerInfo[playerid][pSpecialQuest][11], PlayerInfo[playerid][pSpecialQuest][12], PlayerInfo[playerid][pSpecialQuest][13], PlayerInfo[playerid][pSpecialQuest][14],
				PlayerInfo[playerid][pSpecialQuest][15], PlayerInfo[playerid][pSpecialQuest][16], PlayerInfo[playerid][pSpecialQuest][17], PlayerInfo[playerid][pSpecialQuest][18], PlayerInfo[playerid][pSpecialQuest][19],		
				PlayerInfo[playerid][pSpecialQuest][20], PlayerInfo[playerid][pSpecialQuest][21], PlayerInfo[playerid][pSpecialQuest][22], PlayerInfo[playerid][pSpecialQuest][23], PlayerInfo[playerid][pSpecialQuest][24],
				PlayerInfo[playerid][pSpecialQuest][25], PlayerInfo[playerid][pSpecialQuest][26], PlayerInfo[playerid][pSpecialQuest][27], PlayerInfo[playerid][pSpecialQuest][28], PlayerInfo[playerid][pSpecialQuest][29],	
				PlayerInfo[playerid][pSpecialQuest][30], PlayerInfo[playerid][pSpecialQuest][31], PlayerInfo[playerid][pSpecialQuest][32], PlayerInfo[playerid][pSpecialQuest][33], PlayerInfo[playerid][pSpecialQuest][34],
				PlayerInfo[playerid][pSpecialQuest][35], PlayerInfo[playerid][pSpecialQuest][36], PlayerInfo[playerid][pSpecialQuest][37], PlayerInfo[playerid][pSpecialQuest][38], PlayerInfo[playerid][pSpecialQuest][39],	
				PlayerInfo[playerid][pSpecialQuest][40], PlayerInfo[playerid][pSpecialQuest][41], PlayerInfo[playerid][pSpecialQuest][42], PlayerInfo[playerid][pSpecialQuest][43], PlayerInfo[playerid][pSpecialQuest][44],
				PlayerInfo[playerid][pSpecialQuest][45], PlayerInfo[playerid][pSpecialQuest][46], PlayerInfo[playerid][pSpecialQuest][47], PlayerInfo[playerid][pSpecialQuest][48], PlayerInfo[playerid][pSpecialQuest][49],
				PlayerInfo[playerid][pSpecialQuest][50], PlayerInfo[playerid][pSpecialQuest][51], PlayerInfo[playerid][pSpecialQuest][52], PlayerInfo[playerid][pSpecialQuest][53], PlayerInfo[playerid][pSpecialQuest][54],
				PlayerInfo[playerid][pSpecialQuest][55], PlayerInfo[playerid][pSpecialQuest][56], PlayerInfo[playerid][pSpecialQuest][57], PlayerInfo[playerid][pSpecialQuest][58], PlayerInfo[playerid][pSpecialQuest][59],
				PlayerInfo[playerid][pSpecialQuest][60], PlayerInfo[playerid][pSpecialQuest][61], PlayerInfo[playerid][pSpecialQuest][62], PlayerInfo[playerid][pSpecialQuest][63], PlayerInfo[playerid][pSpecialQuest][64],
				PlayerInfo[playerid][pSpecialQuest][65], PlayerInfo[playerid][pSpecialQuest][66], PlayerInfo[playerid][pSpecialQuest][67], PlayerInfo[playerid][pSpecialQuest][68], PlayerInfo[playerid][pSpecialQuest][69],		
				PlayerInfo[playerid][pSpecialQuest][70], PlayerInfo[playerid][pSpecialQuest][71], PlayerInfo[playerid][pSpecialQuest][72], PlayerInfo[playerid][pSpecialQuest][73], PlayerInfo[playerid][pSpecialQuest][74],
				PlayerInfo[playerid][pSpecialQuest][75], PlayerInfo[playerid][pSpecialQuest][76], PlayerInfo[playerid][pSpecialQuest][77], PlayerInfo[playerid][pSpecialQuest][78], PlayerInfo[playerid][pSpecialQuest][79],	
				PlayerInfo[playerid][pSpecialQuest][80], PlayerInfo[playerid][pSpecialQuest][81], PlayerInfo[playerid][pSpecialQuest][82], PlayerInfo[playerid][pSpecialQuest][83], PlayerInfo[playerid][pSpecialQuest][84],
				PlayerInfo[playerid][pSpecialQuest][85], PlayerInfo[playerid][pSpecialQuest][86], PlayerInfo[playerid][pSpecialQuest][87], PlayerInfo[playerid][pSpecialQuest][88], PlayerInfo[playerid][pSpecialQuest][89],	
				PlayerInfo[playerid][pSpecialQuest][90], PlayerInfo[playerid][pSpecialQuest][91], PlayerInfo[playerid][pSpecialQuest][92], PlayerInfo[playerid][pSpecialQuest][93], PlayerInfo[playerid][pSpecialQuest][94],
				PlayerInfo[playerid][pSpecialQuest][95], PlayerInfo[playerid][pSpecialQuest][96], PlayerInfo[playerid][pSpecialQuest][97], PlayerInfo[playerid][pSpecialQuest][98], PlayerInfo[playerid][pSpecialQuest][99]);	
				for(new i = 0; i < 100; i++) {
					if(PlayerInfo[playerid][pSpecialQuest][i] == 0) {				
						PlayerInfo[playerid][pObjectQuest][i] = CreatePlayerObject(playerid, 1240, QuestPos[i][0], QuestPos[i][1], QuestPos[i][2], 0, 0, 0, 300.0);
					}
				}
			}	

			new skin[64];
			cache_get_field_content(0, "Skin", result); format(skin, 64, result);
            sscanf(skin, "p<|>iiiiiiiiii", PlayerInfo[playerid][pSkins][0], PlayerInfo[playerid][pSkins][1], PlayerInfo[playerid][pSkins][2], PlayerInfo[playerid][pSkins][3], PlayerInfo[playerid][pSkins][4],
            PlayerInfo[playerid][pSkins][5], PlayerInfo[playerid][pSkins][6], PlayerInfo[playerid][pSkins][7], PlayerInfo[playerid][pSkins][8], PlayerInfo[playerid][pSkins][9]);
  
			new achivar[256];
			cache_get_field_content(0, "AchievementStatus", result); format(achivar, 256, result);
			sscanf(achivar, "p<|>iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii", 
			PlayerInfo[playerid][pAchievementStatus][0], PlayerInfo[playerid][pAchievementStatus][1], PlayerInfo[playerid][pAchievementStatus][2], PlayerInfo[playerid][pAchievementStatus][3], PlayerInfo[playerid][pAchievementStatus][4],
			PlayerInfo[playerid][pAchievementStatus][5], PlayerInfo[playerid][pAchievementStatus][6], PlayerInfo[playerid][pAchievementStatus][7], PlayerInfo[playerid][pAchievementStatus][8], PlayerInfo[playerid][pAchievementStatus][9],
			PlayerInfo[playerid][pAchievementStatus][10], PlayerInfo[playerid][pAchievementStatus][11], PlayerInfo[playerid][pAchievementStatus][12], PlayerInfo[playerid][pAchievementStatus][13], PlayerInfo[playerid][pAchievementStatus][14],
			PlayerInfo[playerid][pAchievementStatus][15], PlayerInfo[playerid][pAchievementStatus][16], PlayerInfo[playerid][pAchievementStatus][17], PlayerInfo[playerid][pAchievementStatus][18], PlayerInfo[playerid][pAchievementStatus][19],		
			PlayerInfo[playerid][pAchievementStatus][20], PlayerInfo[playerid][pAchievementStatus][21], PlayerInfo[playerid][pAchievementStatus][22], PlayerInfo[playerid][pAchievementStatus][23], PlayerInfo[playerid][pAchievementStatus][24],
			PlayerInfo[playerid][pAchievementStatus][25], PlayerInfo[playerid][pAchievementStatus][26], PlayerInfo[playerid][pAchievementStatus][27], PlayerInfo[playerid][pAchievementStatus][28], PlayerInfo[playerid][pAchievementStatus][29],	
			PlayerInfo[playerid][pAchievementStatus][30], PlayerInfo[playerid][pAchievementStatus][31]);
			
			SpawnChange[playerid] = cache_get_field_content_int(0, "SpawnChange");
			PlayerInfo[playerid][pSeconds] = cache_get_field_content_float(0, "Seconds");
			PlayerInfo[playerid][pUsed] = cache_get_field_content_int(0, "Used");
			
			PlayerInfo[playerid][pRacePlace][0] = cache_get_field_content_int(0, "RacePlace1");
			PlayerInfo[playerid][pRacePlace][1] = cache_get_field_content_int(0, "RacePlace2");
			PlayerInfo[playerid][pRacePlace][2] = cache_get_field_content_int(0, "RacePlace3");
			PlayerInfo[playerid][pRacePlace][3] = cache_get_field_content_int(0, "RacePlace4");
			PlayerInfo[playerid][pArenaStats][0] = cache_get_field_content_int(0, "ArenaKills");
			PlayerInfo[playerid][pArenaStats][1] = cache_get_field_content_int(0, "ArenaDeaths");
			PlayerInfo[playerid][pPaintKills][0] = cache_get_field_content_int(0, "PaintKills1");
			PlayerInfo[playerid][pPaintKills][1] = cache_get_field_content_int(0, "PaintKills2");
			PlayerInfo[playerid][pPaintKills][2] = cache_get_field_content_int(0, "PaintKills3");
			PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths1");
			PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths2");
			PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths3");
			PlayerInfo[playerid][pCarLicS] = cache_get_field_content_int(0, "CarLicS", SQL);
			PlayerInfo[playerid][pBoatLicS] = cache_get_field_content_int(0, "BoatLicS", SQL);
			PlayerInfo[playerid][pFlyLicS] = cache_get_field_content_int(0, "FlyLicS", SQL);
			PlayerInfo[playerid][pGunLicS] = cache_get_field_content_int(0, "GunLicS", SQL);		
			PlayerInfo[playerid][pCarKey][0] = cache_get_field_content_int(0, "CarKey1", SQL);
			PlayerInfo[playerid][pCarKey][1] = cache_get_field_content_int(0, "CarKey2", SQL);
			PlayerInfo[playerid][pCarKey][2] = cache_get_field_content_int(0, "CarKey3", SQL);
			PlayerInfo[playerid][pCarKey][3] = cache_get_field_content_int(0, "CarKey4", SQL);
			PlayerInfo[playerid][pCarKey][4] = cache_get_field_content_int(0, "CarKey5", SQL);
			PlayerInfo[playerid][pCarKey][5] = cache_get_field_content_int(0, "CarKey6", SQL);
			PlayerInfo[playerid][pCarKey][6] = cache_get_field_content_int(0, "CarKey7", SQL);
			PlayerInfo[playerid][pCarKey][7] = cache_get_field_content_int(0, "CarKey8", SQL);
			PlayerInfo[playerid][pCarKey][8] = cache_get_field_content_int(0, "CarKey9", SQL);
			PlayerInfo[playerid][pCarKey][9] = cache_get_field_content_int(0, "CarKey10", SQL);
			PlayerInfo[playerid][pShowDMG] = cache_get_field_content_int(0, "ShowDMG", SQL);
			PlayerInfo[playerid][pSlot][0] = cache_get_field_content_int(0, "Slot1", SQL);
			PlayerInfo[playerid][pSlot][1] = cache_get_field_content_int(0, "Slot2", SQL);
			PlayerInfo[playerid][pSlot][2] = cache_get_field_content_int(0, "Slot3", SQL);
			PlayerInfo[playerid][pSlot][3] = cache_get_field_content_int(0, "Slot4", SQL);
			PlayerInfo[playerid][pSlot][4] = cache_get_field_content_int(0, "Slot5", SQL);
			PlayerInfo[playerid][pDailyMission][0] = cache_get_field_content_int(0, "DailyMission", SQL);
			PlayerInfo[playerid][pDailyMission][1] = cache_get_field_content_int(0, "DailyMission2", SQL);
			PlayerInfo[playerid][pNeedProgress][0] = cache_get_field_content_int(0, "NeedProgress1", SQL);
			PlayerInfo[playerid][pNeedProgress][1] = cache_get_field_content_int(0, "NeedProgress2", SQL);			
			PlayerInfo[playerid][pProgress][0] = cache_get_field_content_int(0, "Progress", SQL);
			PlayerInfo[playerid][pProgress][1] = cache_get_field_content_int(0, "Progress2", SQL);
			PlayerInfo[playerid][pPizzaSkill] = cache_get_field_content_int(0, "PizzaSkill", SQL);
			PlayerInfo[playerid][pCurierSkill] = cache_get_field_content_int(0, "CurierSkill", SQL);
			PlayerInfo[playerid][pGasCan] = cache_get_field_content_int(0, "GasCan", SQL);
			new string[180];
			PlayerInfo[playerid][pGlasses] = cache_get_field_content_int(0, "Glasses", SQL);
			PlayerInfo[playerid][pShowGlasses] = cache_get_field_content_int(0, "ShowGlasses", SQL);

			PlayerInfo[playerid][pShowHP] = cache_get_field_content_int(0, "ShowHP", SQL);
			PlayerInfo[playerid][pShowCP] = cache_get_field_content_int(0, "ShowCP", SQL);
			PlayerInfo[playerid][pShowAP] = cache_get_field_content_int(0, "ShowAP", SQL);
			PlayerInfo[playerid][pPin] = cache_get_field_content_int(0, "Pin", SQL);
			PlayerInfo[playerid][pFires] = cache_get_field_content_int(0, "Fires", SQL);
			PlayerInfo[playerid][pColor] = cache_get_field_content_int(0, "Color", SQL);
			PlayerInfo[playerid][pDays] = cache_get_field_content_int(0, "Days", SQL);		
			PlayerInfo[playerid][pPilotSkill] = cache_get_field_content_int(0, "PilotSkill", SQL);		
			PlayerInfo[playerid][pEscapePoints] = cache_get_field_content_int(0, "EscapePoints", SQL);
			PlayerInfo[playerid][pHat] = cache_get_field_content_int(0, "Hat", SQL);
			PlayerInfo[playerid][pCoins] = cache_get_field_content_int(0, "Coins", SQL);
			PlayerInfo[playerid][pShowHat] = cache_get_field_content_int(0, "ShowHat", SQL);
			PlayerInfo[playerid][pDailyLogin] = cache_get_field_content_int(0, "DailyLogin", SQL);
			PlayerInfo[playerid][pCrash] = cache_get_field_content_int(0, "Crash", SQL);
  			PlayerInfo[playerid][pAJail] = cache_get_field_content_int(0, "AJail", SQL);		
			PlayerInfo[playerid][pHW] = cache_get_field_content_int(0, "HW", SQL);
			PlayerInfo[playerid][pAW] = cache_get_field_content_int(0, "AW", SQL);
			PlayerInfo[playerid][pLW] = cache_get_field_content_int(0, "LW", SQL);
			  
			new clanid = PlayerInfo[playerid][pClan];
			if(PlayerInfo[playerid][pClan] != 0 && PlayerInfo[playerid][pTag] == 0) {
			    format(string, sizeof(string), "%s%s", ClanInfo[clanid][clTag], PlayerInfo[playerid][pUsername]);
			    SetPlayerName(playerid, string);
			}
			else if(PlayerInfo[playerid][pClan] != 0 && PlayerInfo[playerid][pTag] == 1) {
			    format(string, sizeof(string), "%s%s", PlayerInfo[playerid][pUsername], ClanInfo[clanid][clTag]);
			    SetPlayerName(playerid, string);
			}
			
			LoadPlayerCars(playerid);			
			SetPlayerToTeamColor(playerid);
			ADeathMessage(playerid, INVALID_PLAYER_ID, 200);
			new ip[16];
			GetPlayerIp(playerid, ip, sizeof(ip));
			format(string, sizeof(string), "UPDATE `users` SET `Status` = '1', `IP`='%s' WHERE `ID`='%d'", ip, PlayerInfo[playerid][pSQLID]);
			mysql_tquery(SQL,string, "", "");
			UpdateVar(playerid, "DayLogin", 1);
			TextDrawHideForPlayer(playerid, ServerTD);
			GameTextForPlayer(playerid, " ", 1000, 4);
			SpawnPlayer(playerid);
	   	}
		for( new j = 0; j <= 100; j++) SCM(playerid, COLOR_WHITE, "");
	}
	else {
		new loginstring[128];
		format(loginstring,sizeof(loginstring),"Parola introdusa de tine este incorecta!\nIntrodu parola corecta altfel vei primi kick!",GetName(playerid));
		ShowPlayerDialog(playerid, DIALOG_LOGIN3,DIALOG_STYLE_PASSWORD,"Logare",loginstring,"Logare","Quit");
        mysql_free_result();
        gPlayerLogTries[playerid] += 1;
		new string[180];
		if(gPlayerLogTries[playerid] < 3) format(string, sizeof(string), "Parola incorecta! Mai ai la dispozitie %d incercari.", 3-gPlayerLogTries[playerid]);
		else format(string, sizeof(string), "Parola incorecta! Incercarile au fost epuizate si ai primit kick.", 3-gPlayerLogTries[playerid]);
		SCM(playerid, COLOR_WARNING, string);				
        if(gPlayerLogTries[playerid] == 3) KickEx(playerid);
        return 1;
	}
	mysql_free_result();
	ResetPlayerCash(playerid);
	GivePlayerCash(playerid,PlayerInfo[playerid][pCash]);
	CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
	KillTimer(login[playerid]);
	if(PlayerInfo[playerid][pReg] == 0) {
		PlayerInfo[playerid][pLevel] = 1;
		PlayerInfo[playerid][pHealth] = 100.0;
		PlayerInfo[playerid][pInt] = 0;
		PlayerInfo[playerid][pLocal] = 255;
		PlayerInfo[playerid][pTeam] = 3;
		PlayerInfo[playerid][pModel] = 250;
		PlayerInfo[playerid][pHouse] = 999;
		PlayerInfo[playerid][pBizz] = 255;
		PlayerInfo[playerid][pAccount] = 1000;
		PlayerInfo[playerid][pReg] = 1;
		SetPlayerInterior(playerid,0);
		new string[300];
		new d,m,y;
		getdate(y,m,d);
		new h,mine,s;
		gettime(h,mine,s);
		format(string, sizeof(string),  "%d/%d/%d %d:%d:%d",d,m,y,h,mine,s);
		strmid(PlayerInfo[playerid][pRegistredDate], string, 0, strlen(string), 255);
		new str[180];
		format(str,sizeof(str),"UPDATE users SET `pHealth`='100.0',`Team`='3',`Model`='250' WHERE `ID`='%d'",PlayerInfo[playerid][pSQLID]);
		mysql_query(SQL,str);
		Update(playerid,pCashx);
		Update(playerid,pLevelx);
		Update(playerid,pHousex);
		Update(playerid,pBizzx);
		Update(playerid,pPnumberx);
		Update(playerid,pRegx);
		Update(playerid,pRegistredDatex);
	}
	if(PlayerInfo[playerid][pBTemp] == 1) { TempBanCheck(playerid); return 1; }
	if(PlayerInfo[playerid][pBanned] == 1) {
		for( new j = 0; j <= 100; j++) SCM(playerid, COLOR_WHITE, "");
		SCM(playerid, COLOR_WARNING, "Acest cont este banat permanent!");
		new str[180];
		format(str, sizeof str, "Ai fost banat de adminul %s.",PlayerInfo[playerid][pBBy]);
		SCM(playerid, COLOR_CLIENT, str);
		format(str, sizeof str, "Motivul: %s",PlayerInfo[playerid][pBReason]);
		SCM(playerid, COLOR_CLIENT, str);
		KickEx(playerid);
		SetPlayerCameraPos(playerid, 1183.0143, -965.7394, 129.6071);
		SetPlayerCameraLookAt(playerid, 1183.7214, -965.0270, 129.2470);
		TogglePlayerSpectating(playerid, 0);		
		return 1;
	}
    StopAudioStreamForPlayer(playerid);
	SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
	new string2[180];
	if(PlayerInfo[playerid][pTut] != 0) {	
		for(new i = 0; i < 18; i++) TextDrawHideForPlayer(playerid, LoginTD[i]);
		format(string2, 256, "Bine ai venit, %s!", GetName(playerid));
		SCM(playerid, -1, string2);
		if(PlayerInfo[playerid][pMember] != 0) {
			if(PlayerInfo[playerid][pDays] == 30) {
				if(PlayerInfo[playerid][pMember] == 11) finishAchievement(playerid, 23);	
				else if(IsACop(playerid)) finishAchievement(playerid, 24);	
				else if(IsAMember(playerid)) finishAchievement(playerid, 25);	
				else finishAchievement(playerid, 22);		
			}
		}
	}	
	if(PlayerInfo[playerid][pWantedLevel] > 0 && PlayerInfo[playerid][pTut] != 0) {
		format(string2, sizeof(string2), "Aveai wanted %d inainte sa iesi de pe server.",PlayerInfo[playerid][pWantedLevel]);
		SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
		SCM(playerid, COLOR_LIGHTRED, string2);
	}
	SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], 937.1783,-1717.5684,13.5469, 1.0, -1, -1, -1, -1, -1, -1);
	if(gTeam[playerid] == 0) gTeam[playerid] = 3;
	else gTeam[playerid] = PlayerInfo[playerid][pTeam];
	if(PlayerInfo[playerid][pMember] != 0 && PlayerInfo[playerid][pTut] != 0) {
	    new disc[84];
	    format(disc,sizeof(disc),"(Factiune) %s s-a conectat pe server.",GetName(playerid));
	    SendFactionMessage(PlayerInfo[playerid][pMember], COLOR_CLIENT, disc);
	}

	HudProgress[playerid][0] = CreatePlayerProgressBar(playerid, 513.00, 150.00, 85.50, 2.50, 0x00FF00FF, 100.0);	
	HudProgress[playerid][1] = CreatePlayerProgressBar(playerid, 513.00, 175.00, 85.50, 2.50, 0x00FF00FF, 100.0);
	UpdateProgress(playerid, 0);
	UpdateProgress(playerid, 1);

	
	new sendername[25],playersip[64],iplog[184];
	GetPlayerName(playerid,sendername,sizeof(sendername));
	GetPlayerIp(playerid,playersip,sizeof(playersip));
	LogIP(playersip,PlayerInfo[playerid][pSQLID]);
	format(iplog,sizeof(iplog),"%s(%d) connected on the server with IP: %s.",sendername,playerid,playersip);
	SendIP(COLOR_WHITE,iplog);
	IsPlayerLogged[playerid] = 1;
	if(PlayerInfo[playerid][pTut] == 0) {
		gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
		TogglePlayerControllable(playerid, 0);
		RegistrationStep[playerid] = 1;
		SCM(playerid, 0xFFDE96FF, "Te rugam sa raspunzi la urmatoarele intrebari.");
		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_MSGBOX, "Register:", "Care este sexul caracterului tau?\nMasculin sau Feminin?", "Masculin", "Feminin");
		SetPlayerInterior(playerid, 0);
	}	
	printf("%s has logged in with IP %s.",sendername,playersip);
	if(PlayerInfo[playerid][pDailyMission][0] == -1 || PlayerInfo[playerid][pDailyMission][1] == -1) GiveQuest(playerid);
	if(PlayerInfo[playerid][pTut] != 0) {
		if(PlayerInfo[playerid][pLevel] < 5) {
			SCM(playerid, -1, "Pentru a vedea ce misiuni ai in aceasta zi, foloseste /quests.");
			
		}
		new clanid = PlayerInfo[playerid][pClan], string[180];
		if(clanid != 0) {
			format(string, sizeof(string), "{%s}(CMOTD): %s.", ClanInfo[PlayerInfo[playerid][pClan]][clColor], ClanInfo[PlayerInfo[playerid][pClan]][clMotd]);
			MesajLung(playerid, -1, string);
		}
		if(PlayerInfo[playerid][pMember] != 0) {
			if(strlen(DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]) > 0)
			{
				new factioninfo[128];
				format(factioninfo,sizeof(factioninfo), "(FMOTD): %s",DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]);
				MesajLung(playerid,COLOR_YELLOW,factioninfo);
			}		
		}
		new szQuery[256], szString[180], onf, Cache: results;
		format(szQuery, sizeof(szQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d'", PlayerInfo[playerid][pSQLID]);
		results = mysql_query(SQL, szQuery);
		// playerid login
		for(new i, j = cache_get_row_count (); i != j; ++i)
		{
			cache_get_field_content(i, "friendName", szString);
			new userID = GetPlayerID(szString);
			if(userID != INVALID_PLAYER_ID) onf ++;
		}
		cache_delete(results);
		format(string, sizeof(string), "Ai %d prieteni conectati in lista ta de prieteni.", onf);
		
		if(onf != 0) {
			PlayerTextDrawSetString(playerid, FriendTD, string);
			PlayerTextDrawShow(playerid, FriendTD);
			SetTimerEx("HideFriendTD", 3000, false, "i", playerid);			
		}
	
		if(PlayerInfo[playerid][pDailyLogin] == 0) SCM(playerid, COLOR_LIGHTBLUE, "Vei primi de doua ori mai multi bani si puncte de respect la urmatorul payday.");
		if(PlayerInfo[playerid][pBizz] != 255) finishAchievement(playerid, 2);
		if(PlayerInfo[playerid][pHouse] != 999 && strcmp(GetName(playerid), HouseInfo[PlayerInfo[playerid][pHouse]][hOwner], true) == 0) finishAchievement(playerid, 3);

		// if exist player in other friend list
		foreach(Player, i) {
			if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
				format(szQuery, sizeof(szQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d' AND `friendID` = '%d'", PlayerInfo[i][pSQLID], PlayerInfo[playerid][pSQLID]);
				results = mysql_query(SQL, szQuery);
				cache_get_field_content(0, "AddBy", szString);
				new friendID = strval(szString);
				cache_delete(results);
				if(PlayerInfo[i][pSQLID] == friendID && friendID != 0) {
					if(PlayerInfo[playerid][pAdmin] < 7) {
						format(string, sizeof(string), "Prietenul tau, %s, s-a conectat pe server.", GetName(playerid));
						PlayerTextDrawSetString(i, FriendTD, string);
						PlayerTextDrawShow(i, FriendTD);
						SetTimerEx("HideFriendTD", 3000, false, "i", i);	
					}	
				}
			}
		}	
		CalculateEmails(playerid);
		check_save(playerid);
	}	
	return 1;
}

asta este onplayerlogin la mine

Edited by Sprite_RoPlayers
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.