Jump to content

[REZOLVAT] intrebare update


Jakewow
 Share

Recommended Posts

Salut, ma poate indruma cineva cum sa fac si eu functia de Update mai optimizata?

Adica am inceput un gm de la 0 si nu prea mi-ar place cu " #define pAdminx 1  " bla bla daca-mi poate spune sa daca ma poate ajuta cineva as fi recunoscator!

Link to comment
Share on other sites

@@Leonard,

 

cf5ccc00c4ba100e31104c4a2c0a6c9e.png

 

Sau daca nu, faci interogarea directa.

 

dar asa se vor face foarte multe linii si ma gandeam la asta :

function Update(playerid, dbname[], gamename) {
	new string[1024];
	mysql_format(handle, string, sizeof string, "UPDATE `users` SET `%s` = '%d' WHERE `ID` = '%d'", dbname, gamename, PlayerInfo[playerid][pID]);
	mysql_tquery(handle, string, "", "");
	return 1;
}

si de fiecare data cand e nevoie o folosesc

Link to comment
Share on other sites

  • Administrator

@@Leonard,

 

 

dar asa se vor face foarte multe linii si ma gandeam la asta :

function Update(playerid, dbname[], gamename) {
	new string[1024];
	mysql_format(handle, string, sizeof string, "UPDATE `users` SET `%s` = '%d' WHERE `ID` = '%d'", dbname, gamename, PlayerInfo[playerid][pID]);
	mysql_tquery(handle, string, "", "");
	return 1;
}

si de fiecare data cand e nevoie o folosesc

Tot aia e, n-are nimic daca ai mult linii.

Link to comment
Share on other sites

@@Leonard,

 

 

dar asa se vor face foarte multe linii si ma gandeam la asta :

function Update(playerid, dbname[], gamename) {
	new string[1024];
	mysql_format(handle, string, sizeof string, "UPDATE `users` SET `%s` = '%d' WHERE `ID` = '%d'", dbname, gamename, PlayerInfo[playerid][pID]);
	mysql_tquery(handle, string, "", "");
	return 1;
}

si de fiecare data cand e nevoie o folosesc

Gamemode-urile rusesti ajung si la 200k linii, si nu stiu daca ai vazut, dar se misca foarte bine...

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...