Peršokti į turinį

[pagalbos] Del Mysql r39 Krovimo


Recommended Posts

Niekaip neuzkrauna visu poziciju.

 

 

Kodas:

SetPlayerPos(playerid, pInfo[playerid][posX], pInfo[playerid][posY], pInfo[playerid][posZ]);
    SetPlayerFacingAngle(playerid, pInfo[playerid][posR]);
    Admin[playerid] = cache_get_field_content_int(0, "Admin"); //we're getting a field 4 from row 0. And since it's an integer, we use cache_get_row_int
 	pInfo[playerid][Pinigai] = cache_get_field_content_int(0, "Pinigai");//Above
 	pInfo[playerid][posX] = cache_get_field_content_float(0, "PosX");//Above. Since player's position is a float, we use cache_get_field_content_float
 	pInfo[playerid][posY] = cache_get_field_content_float(0, "PosY");//Above
 	pInfo[playerid][posZ] = cache_get_field_content_float(0, "PosZ");//Above
 	pInfo[playerid][posR] = cache_get_field_content_float(0, "PosR");//Above

 	GivePlayerMoney(playerid, pInfo[playerid][Pinigai]);//Let's set their money
 	playerDB[playerid][authstate]=2;
	
	GameTextForPlayer(playerid,"~r~] Tavo zaidimas ikeltas ]",1000,5);

Mysql_log:

19:27:10] [DEBUG] Calling callback "LoadPlayerData"..
[19:27:10] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Admin", connection: 1
[19:27:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Admin", data: "1"
[19:27:10] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Pinigai", connection: 1
[19:27:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Pinigai", data: "0"
[19:27:10] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosX", connection: 1
[19:27:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosX", data: "-1462.13"
[19:27:10] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosY", connection: 1
[19:27:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosY", data: "-280.637"
[19:27:10] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosZ", connection: 1
[19:27:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosZ", data: "14"
[19:27:10] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosR", connection: 1
[19:27:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosR", data: "82.978"
[19:27:10] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called

Nuoroda ─» komentar─ů
Dalintis per kit─ů puslap─»


(redaguota)

Ok susitvarkiau Dar viena beda:

 

new bool:TeisesM[MAX_PLAYERS];

new bool:Kaleime[MAX_PLAYERS];

o kiti

new Pinigai[MAX_PLAYERS]; // Veikia viskas graziai

        Admin[ playerid ] = cache_get_field_content_int(0, "Admin",mysql); //we're getting a field 4 from row 0. And since it's an integer, we use cache_get_row_int
 	Pinigai[ playerid ] = cache_get_field_content_int(0, "Pinigai",mysql);//Above
 	Patirtis[ playerid ] = cache_get_field_content_int(0, "Patirtis",mysql);//Above
 	SavePos[ playerid ][ 0 ] = cache_get_field_content_float(0, "PosX",mysql);//Above. Since player's position is a float, we use cache_get_field_content_float
 	SavePos[ playerid ][ 1 ] = cache_get_field_content_float(0, "PosY",mysql);//Above
 	SavePos[ playerid ][ 2 ] = cache_get_field_content_float(0, "PosZ",mysql);//Above
 	SavePos[ playerid ][ 3 ] = cache_get_field_content_float(0, "PosR",mysql);//Above
 	TeisesM[ playerid ] = cache_get_field_content_int(0, "TeisesM",mysql);//Above
 	Kaleime[ playerid ] = cache_get_field_content_int(0, "Kaleime",mysql);//Above

Meta warning Del teises ir kaleime kaip istaisyt?:

C:\Users\Dell\Desktop\Grp naujas\gamemodes\GRP4.pwn(6255) : warning 213: tag mismatch
C:\Users\Dell\Desktop\Grp naujas\gamemodes\GRP4.pwn(6256) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
 
Redaguota , nario BoCeNas*
Nuoroda ─» komentar─ů
Dalintis per kit─ů puslap─»

Nu nes turb┼źt i┼ígauna integer reik┼ím─Ö, tai skai─Źi┼ź o reikia bool tai true arba false. Tai gali ka┼żk─ů pana┼íaus pasidaryt (kit─ů atitinkamai):

 

TeisesM[ playerid ] = cache_get_field_content_int(0, "TeisesM",mysql) ? true : false;
Nuoroda ─» komentar─ů
Dalintis per kit─ů puslap─»

Prisijungti prie diskusijos

Palikti atsakym─ů galite i┼í karto, o u┼żsiregistruoti v─Śliau. Jeigu jau turite paskyr─ů m┼źs┼│ forume, Prisijunkite.

Sve─Źias
Atsakyti šioje temoje...

×   ─«klijuotas tekstas turi teksto formatavim─ů.   Pa┼íalinti teksto formatavim─ů

  Galimi tik 75 veidukai.

×   Nuoroda buvo automati┼íkai ─»terpta.   ─«terpti nuorod─ů paprastai

×   J┼źs┼│ ankstesnis prane┼íimas buvo atkurtas.   I┼ívalyti redaktori┼│

×   J┼źs negalite ─»kelti nuotraukas tiesiogiai.─«kelkite arba ─»d─Śkite nuotraukas i┼í URL.

  • ┼áiame puslapyje nar┼ío:   0 nariai

    • N─Śra registruot┼│ nari┼│ per┼żi┼źrin─Źi┼│ ┼í─» forum─ů.


├Ś
├Ś
  • Sukurti nauj─ů...