[Ajuda] Ajuda MYSQL Load/Save
#1

Nгo ta carregando e nem salvando minhas facзхes
Por que?

Logs quando inicia o servidor...
Код:
[21:41:51] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM factions", callback: "Carregar_Factions", format: "(null)"
[21:41:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[21:41:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[21:41:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[21:41:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[21:41:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[21:41:51] [DEBUG] CMySQLQuery::Execute[Carregar_Factions] - starting query execution
[21:41:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[21:41:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[21:41:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[21:41:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[21:41:52] [DEBUG] CMySQLQuery::Execute[Carregar_Factions] - query was successfully executed within 19.732 milliseconds
[21:41:52] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[21:41:52] [DEBUG] Calling callback "Carregar_Factions"..
[21:41:52] [DEBUG] cache_get_row_count - connection: 1
[21:41:52] [DEBUG] cache_get_row_count - connection: 1
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "facname", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "facname", data: "Eight Gaming"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "lider1", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "lider1", data: "[8G]Tiago"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "lider2", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "lider2", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "lider3", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "lider3", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro1", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro1", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro2", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro2", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro3", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro3", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro4", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro4", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro5", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro5", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro6", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro6", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro7", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro7", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro8", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro8", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro9", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro9", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro10", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro10", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro11", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro11", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content - row: 0, field_name: "membro12", connection: 1, max_len: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "membro12", data: "Empty"
[21:41:52] [DEBUG] cache_get_field_content_float - row: 0, field_name: "HQposX", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "HQposX", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_float - row: 0, field_name: "HQposY", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "HQposY", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_float - row: 0, field_name: "HQposZ", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "HQposZ", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "hq", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "hq", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "cofredinheiro", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "cofredinheiro", data: "2000"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "cofresalario", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "cofresalario", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "cofrematerial", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "cofrematerial", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "cofremaconha", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "cofremaconha", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "EagleSPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "EagleSPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "shotgunSPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "shotgunSPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "spazSPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "spazSPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "mp5SPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "mp5SPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "akSPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "akSPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "m4SPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "m4SPAWNfac", data: "1"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "rifleSPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "rifleSPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "sniperSPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "sniperSPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_field_content_int - row: 0, field_name: "meleeSPAWNfac", connection: 1
[21:41:52] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "meleeSPAWNfac", data: "0"
[21:41:52] [DEBUG] cache_get_row_count - connection: 1
[21:41:52] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
Para carregar (ongamemodeinit)
Код:
CarregarFactions()
{
    mysql_tquery(ConnectMYSQL, "SELECT * FROM factions", "Carregar_Factions", "");
    return 1;
}

forward Carregar_Factions();
public Carregar_Factions()
{
    if(!cache_num_rows()) return 0;
    for(new row; row < cache_num_rows(); row++) {
		cache_get_field_content(row, "facname", FactionInfo[row][facname]);
		cache_get_field_content(row, "lider1", FactionInfo[row][lider1]);
		cache_get_field_content(row, "lider2", FactionInfo[row][lider2]);
		cache_get_field_content(row, "lider3", FactionInfo[row][lider3]);
		cache_get_field_content(row, "membro1", FactionInfo[row][membro1]);
		cache_get_field_content(row, "membro2", FactionInfo[row][membro2]);
		cache_get_field_content(row, "membro3", FactionInfo[row][membro3]);
		cache_get_field_content(row, "membro4", FactionInfo[row][membro4]);
		cache_get_field_content(row, "membro5", FactionInfo[row][membro5]);
		cache_get_field_content(row, "membro6", FactionInfo[row][membro6]);
		cache_get_field_content(row, "membro7", FactionInfo[row][membro7]);
		cache_get_field_content(row, "membro8", FactionInfo[row][membro8]);
		cache_get_field_content(row, "membro9", FactionInfo[row][membro9]);
		cache_get_field_content(row, "membro10", FactionInfo[row][membro10]);
		cache_get_field_content(row, "membro11", FactionInfo[row][membro11]);
		cache_get_field_content(row, "membro12", FactionInfo[row][membro12]);

		FactionInfo[row][HQposX] = cache_get_field_content_float(row, "HQposX");
		FactionInfo[row][HQposY] = cache_get_field_content_float(row, "HQposY");
		FactionInfo[row][HQposZ] = cache_get_field_content_float(row, "HQposZ");

		FactionInfo[row][hq] = cache_get_field_content_int(row, "hq");
		FactionInfo[row][cofredinheiro] = cache_get_field_content_int(row, "cofredinheiro");
		FactionInfo[row][cofresalario] = cache_get_field_content_int(row, "cofresalario");
		FactionInfo[row][cofrematerial] = cache_get_field_content_int(row, "cofrematerial");
		FactionInfo[row][cofremaconha] = cache_get_field_content_int(row, "cofremaconha");
		FactionInfo[row][EagleSPAWNfac] = cache_get_field_content_int(row, "EagleSPAWNfac");
		FactionInfo[row][shotgunSPAWNfac] = cache_get_field_content_int(row, "shotgunSPAWNfac");
		FactionInfo[row][spazSPAWNfac] = cache_get_field_content_int(row, "spazSPAWNfac");
		FactionInfo[row][mp5SPAWNfac] = cache_get_field_content_int(row, "mp5SPAWNfac");
		FactionInfo[row][akSPAWNfac] = cache_get_field_content_int(row, "akSPAWNfac");
		FactionInfo[row][m4SPAWNfac] = cache_get_field_content_int(row, "m4SPAWNfac");
		FactionInfo[row][rifleSPAWNfac] = cache_get_field_content_int(row, "rifleSPAWNfac");
		FactionInfo[row][sniperSPAWNfac] = cache_get_field_content_int(row, "sniperSPAWNfac");
		FactionInfo[row][meleeSPAWNfac] = cache_get_field_content_int(row, "meleeSPAWNfac");
    }
    return 1;
}
Para salvar, ongamemodeexit

Код:
forward SalvarFactions();
public SalvarFactions() {
	for(new factionid; factionid < MAX_FACTIONS; factionid++) {
		new query[1030];
		format(query, sizeof(query), "UPDATE `factions` SET `facname` = '%s', `HQposX` = '%f', `HQposY` = '%f', `HQposZ` = '%f', `EagleSPAWNfac` = '%d', `shotgunSPAWNfac` = '%d', `spazSPAWNfac` = '%d', `mp5SPAWNfac` = '%d', `akSPAWNfac` = '%d', `m4SPAWNfac` = '%d', `rifleSPAWNfac` = '%d', `sniperSPAWNfac` = '%d', `meleeSPAWNfac` = '%d', `cofredinheiro` = '%d', `cofresalario` = '%d', `cofrematerial` = '%d', `cofremaconha` = '%d' WHERE `ID` = '%i' ",
            FactionInfo[factionid][facname],
            FactionInfo[factionid][HQposX],
            FactionInfo[factionid][HQposY],
            FactionInfo[factionid][HQposZ],
            FactionInfo[factionid][EagleSPAWNfac],
            FactionInfo[factionid][shotgunSPAWNfac],
			FactionInfo[factionid][spazSPAWNfac],
			FactionInfo[factionid][mp5SPAWNfac],
			FactionInfo[factionid][akSPAWNfac],
			FactionInfo[factionid][m4SPAWNfac],
			FactionInfo[factionid][rifleSPAWNfac],
			FactionInfo[factionid][sniperSPAWNfac],
			FactionInfo[factionid][meleeSPAWNfac],
			FactionInfo[factionid][cofredinheiro],
			FactionInfo[factionid][cofresalario],
			FactionInfo[factionid][cofrematerial],
			FactionInfo[factionid][ID] );
		mysql_pquery(ConnectMYSQL, query);

		format(query, sizeof(query), "UPDATE `factions` SET `lider1` = '%s', `lider2` = '%s', `lider3` = '%s', `membro1` = '%s', `membro2` = '%s', `membro3` = '%s', `membro4` = '%s', `membro5` = '%s', `membro6` = '%s', `membro7` = '%s', `membro8` = '%s', `membro9` = '%s', `membro10` = '%s', `membro11` = '%s', `membro12` = '%s' WHERE `ID` = '%i' ",
			FactionInfo[factionid][lider1],
			FactionInfo[factionid][lider2],
			FactionInfo[factionid][lider3],
			FactionInfo[factionid][membro1],
			FactionInfo[factionid][membro2],
			FactionInfo[factionid][membro3],
			FactionInfo[factionid][membro4],
			FactionInfo[factionid][membro5],
			FactionInfo[factionid][membro6],
			FactionInfo[factionid][membro7],
			FactionInfo[factionid][membro8],
			FactionInfo[factionid][membro9],
			FactionInfo[factionid][membro10],
			FactionInfo[factionid][membro11],
			FactionInfo[factionid][membro12],
			FactionInfo[factionid][ID] );
		mysql_pquery(ConnectMYSQL, query);
	}
}
Reply
#2

Estude!
https://sampwiki.blast.hk/wiki/MySQL/R33
Reply
#3

Vc acha que eu jб nгo li isso @hard?

O mais estranho й que as funзхes de salvar e carregar pra player tгo funcionando, olha como ta, parece estar pior

My load players is working... So why my factions load not work?

My load players:

Save players
Код:
stock OnPlayerSave(playerid) {
    new query[1250], ip[25];
    GetPlayerIp(playerid, ip, sizeof(ip));
    money[playerid] = GetPlayerMoneyEx(playerid);

    format(query, sizeof(query), "UPDATE `accounts` SET `Username` = '%s', `IP` = '%s', `scorelevel` = '%d', `maconha` = '%d', `sementes` = '%d', `BPsize` = '%d', `lastlogin` = '%d', `wanted` = '%d', `moneybag` = '%d', `COPskills` = '%d', `CRIMINALskills` = '%d', `PARAMEDICskills` = '%d', `admin` = '%d', `money` = '%d', `bank` = '%d', `kills` = '%d', `deaths` = '%d' WHERE `Username` = '%s' ",
    GetName(playerid),
    ip,
    scorelevel[playerid],
    maconha[playerid],
    sementes[playerid],
    BPsize[playerid],
    lastlogin[playerid],
    wanted[playerid],
    moneybag[playerid],
    COPskills[playerid],
    CRIMINALskills[playerid],
    PARAMEDICskills[playerid],
    admin[playerid],
    money[playerid],
    bank[playerid],
    kills[playerid],
    deaths[playerid],
    GetName(playerid));
    mysql_pquery(ConnectMYSQL, query);

    format(query, sizeof(query), "UPDATE `accounts` SET `eagleSPAWN` = '%d', `shotgunSPAWN` = '%d', `spazSPAWN` = '%d', `mp5SPAWN` = '%d', `akSPAWN` = '%d', `m4SPAWN` = '%d', `rifleSPAWN` = '%d', `sniperSPAWN` = '%d', `meleeSPAWN` = '%d' WHERE `Username` = '%s'",
    GetName(playerid),
    EagleSPAWN[playerid],
    shotgunSPAWN[playerid],
    spazSPAWN[playerid],
    mp5SPAWN[playerid],
    akSPAWN[playerid],
    m4SPAWN[playerid],
    rifleSPAWN[playerid],
    sniperSPAWN[playerid],
    meleeSPAWN[playerid],
    GetName(playerid));
    mysql_pquery(ConnectMYSQL, query);

    format(query, sizeof(query), "UPDATE `accounts` SET `DP` = '%d', `VIP` = '%d', `fmembro` = '%d', `fcargo` = '%d', `preso` = '%d', `presotime` = '%d', `startVIPdia` = '%d', `startVIPmes` = '%d', `startVIPano` = '%d', `carid` = '%d', `carpos0` = '%f', `carpos1` = '%f', `carpos2` = '%f', `carpos3` = '%f' WHERE Username = '%s'",
    DP[playerid],
    VIP[playerid],
    fmembro[playerid],
    fcargo[playerid],
    preso[playerid],
    presotime[playerid],
    startVIPdia[playerid],
    startVIPmes[playerid],
    startVIPano[playerid],
    carid[playerid],
    carpos[playerid][0],
    carpos[playerid][1],
    carpos[playerid][2],
    carpos[playerid][3],
    GetName(playerid) );
    mysql_pquery(ConnectMYSQL, query);

    format(query, sizeof(query), "UPDATE `accounts` SET `spawnpoint` = '%d', `housekey` = '%d', `idiom` = '%d', `tutorial` = '%d', `banned` = '%d', `leftBANdia` = '%d', `leftBANmes` = '%d', `leftBANano` = '%d', `morto` = '%d', `mortotime` = '%d' WHERE Username = '%s'",
    spawnpoint[playerid],
    housekey[playerid],
    idiom[playerid],
    tutorial[playerid],
    banned[playerid],
    leftBANdia[playerid],
    leftBANmes[playerid],
    leftBANano[playerid],
	morto[playerid],
	mortotime[playerid],
    GetName(playerid) );
    mysql_pquery(ConnectMYSQL, query);
}
Load players
Код:
stock OnPlayerLogin(playerid)
{
    new query[512], rows, fields;
	mysql_format(ConnectMYSQL, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Username` = '%s'", Nome(playerid) );
	mysql_query(ConnectMYSQL,query);
    cache_get_data(rows, fields);
    if(rows)
    {
		new int_dest[45];
		int_dest[0] = cache_get_field_content_int(0, "UserID");               	pInfo[playerid][UserID] = int_dest[0];
		int_dest[1] = cache_get_field_content_int(0, "scorelevel");         	scorelevel[playerid] = int_dest[1];
		int_dest[2] = cache_get_field_content_int(0, "maconha");           		maconha[playerid] = int_dest[2];
		int_dest[3] = cache_get_field_content_int(0, "sementes");           	sementes[playerid] = int_dest[3];
		int_dest[4] = cache_get_field_content_int(0, "BPsize");          	 	BPsize[playerid] = int_dest[4];
		int_dest[5] = cache_get_field_content_int(0, "wanted");          	 	wanted[playerid] = int_dest[5];
		int_dest[6] = cache_get_field_content_int(0, "moneybag");          		moneybag[playerid] = int_dest[6];
		int_dest[7] = cache_get_field_content_int(0, "COPskills");          	COPskills[playerid] = int_dest[7];
		int_dest[8] = cache_get_field_content_int(0, "CRIMINALskills");         CRIMINALskills[playerid] = int_dest[8];
		int_dest[9] = cache_get_field_content_int(0, "PARAMEDICskills");        PARAMEDICskills[playerid] = int_dest[9];
		int_dest[10] = cache_get_field_content_int(0, "admin");     			admin[playerid] = int_dest[10];
		int_dest[11] = cache_get_field_content_int(0, "money");     			money[playerid] = int_dest[11];
		int_dest[12] = cache_get_field_content_int(0, "bank");     				bank[playerid] = int_dest[12];
		int_dest[13] = cache_get_field_content_int(0, "kills");     			kills[playerid] = int_dest[13];
		int_dest[14] = cache_get_field_content_int(0, "deaths");     			deaths[playerid] = int_dest[14];
		int_dest[15] = cache_get_field_content_int(0, "DP");     				DP[playerid] = int_dest[15];
		int_dest[16] = cache_get_field_content_int(0, "VIP");     				VIP[playerid] = int_dest[16];
		int_dest[17] = cache_get_field_content_int(0, "fmembro");     			fmembro[playerid] = int_dest[17];
		int_dest[18] = cache_get_field_content_int(0, "fcargo");     			fcargo[playerid] = int_dest[18];
		int_dest[19] = cache_get_field_content_int(0, "preso");     			preso[playerid] = int_dest[19];
		int_dest[20] = cache_get_field_content_int(0, "presotime");     		presotime[playerid] = int_dest[20];
		int_dest[21] = cache_get_field_content_int(0, "startVIPdia");     		startVIPdia[playerid] = int_dest[21];
		int_dest[22] = cache_get_field_content_int(0, "startVIPmes");     		startVIPmes[playerid] = int_dest[22];
		int_dest[23] = cache_get_field_content_int(0, "startVIPano");     		startVIPano[playerid] = int_dest[23];
		int_dest[24] = cache_get_field_content_int(0, "carid");     			carid[playerid] = int_dest[24];
		int_dest[25] = cache_get_field_content_int(0, "spawnpoint");     		spawnpoint[playerid] = int_dest[25];
		int_dest[26] = cache_get_field_content_int(0, "housekey");     			housekey[playerid] = int_dest[26];
		int_dest[27] = cache_get_field_content_int(0, "tutorial");     			tutorial[playerid] = int_dest[27];
		int_dest[28] = cache_get_field_content_int(0, "idiom");     			idiom[playerid] = int_dest[28];
		int_dest[29] = cache_get_field_content_int(0, "banned");     			banned[playerid] = int_dest[29];
		int_dest[30] = cache_get_field_content_int(0, "leftBANdia");     		leftBANdia[playerid] = int_dest[30];
		int_dest[31] = cache_get_field_content_int(0, "leftBANmes");     		leftBANmes[playerid] = int_dest[31];
		int_dest[32] = cache_get_field_content_int(0, "leftBANano");     		leftBANano[playerid] = int_dest[32];
		int_dest[33] = cache_get_field_content_int(0, "eagleSPAWN");     				EagleSPAWN[playerid] = int_dest[33];
		int_dest[34] = cache_get_field_content_int(0, "shotgunSPAWN");     			shotgunSPAWN[playerid] = int_dest[34];
		int_dest[35] = cache_get_field_content_int(0, "spazSPAWN");     				spazSPAWN[playerid] = int_dest[35];
		int_dest[36] = cache_get_field_content_int(0, "mp5SPAWN");     				mp5SPAWN[playerid] = int_dest[36];
		int_dest[37] = cache_get_field_content_int(0, "akSPAWN");     				akSPAWN[playerid] = int_dest[37];
		int_dest[38] = cache_get_field_content_int(0, "m4SPAWN");     				m4SPAWN[playerid] = int_dest[38];
		int_dest[39] = cache_get_field_content_int(0, "rifleSPAWN");     				rifleSPAWN[playerid] = int_dest[39];
		int_dest[40] = cache_get_field_content_int(0, "sniperSPAWN");     			sniperSPAWN[playerid] = int_dest[40];
		int_dest[41] = cache_get_field_content_int(0, "meleeSPAWN");     			meleeSPAWN[playerid] = int_dest[41];
		int_dest[42] = cache_get_field_content_int(0, "lastlogin");          	 		lastlogin[playerid] = int_dest[42];
		int_dest[43] = cache_get_field_content_int(0, "morto");     			morto[playerid] = int_dest[43];
		int_dest[44] = cache_get_field_content_int(0, "mortotime");     		mortotime[playerid] = int_dest[44];


		new Float:float_dest[4];
		float_dest[0] = cache_get_field_content_float(0, "carpos0");     	carpos[playerid][0] = float_dest[0];
		float_dest[1] = cache_get_field_content_float(0, "carpos1");     	carpos[playerid][1] = float_dest[1];
		float_dest[2] = cache_get_field_content_float(0, "carpos2");     	carpos[playerid][2] = float_dest[2];
		float_dest[3] = cache_get_field_content_float(0, "carpos3");     	carpos[playerid][3] = float_dest[3];

		GivePlayerMoneyEx(playerid, money[playerid]);
Reply
#4

Alguйm por favor poderia me ajudar com isso? Nгo sei porque, pelo menos no de carregar
Reply
#5

Tenta adcionar mais um "" como parвmetro naquele tquery
Reply
#6

Assim?
Код:
mysql_tquery(ConnectMYSQL, "SELECT * FROM factions", "Carregar_Factions", "", "");
Tentei e nгo pegou
Reply
#7

tava querendo terminar meu gm, mas to travado a semanas nisso, alguйm peloamor me ajuda!!!
Reply
#8

Era sу 1 no tquery e 2 no pquery, lк a wiki quando for fazer algo cara, isso й tгo bбsico.

Estrutura correta :

mysql_tquery ou mysql_pquery, parвmetros: (connection handle, query[], callback[], format[], params);

Exemplo de uso:

mysql_tquery(MYSQL, "SELECT * FROM users WHERE id = 1", "OnUserLoad", "i", 1);

ou

mysql_tquery(MYSQL, "UPDATE users SET money = 1000 WHERE id = 1", "", "");


Cara isso й o bбsico do pawn, se tu nгo entender isso recomendo voltar pro INI atй estar preparado pra algo um pouco mais avanзado como o mysql.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)