Mysql Login System[Problem]
#6

Quote:
Originally Posted by Koala818
Посмотреть сообщение
Now show us the "OnQueryFinish" function.
Код:
public OnQueryFinish(resultid, extraid, ConnectionHandle)
{
	new szRows, szFields;

	if(resultid != THREAD_NO_RESULT)
	{
		cache_get_data(szRows, szFields);
	}

	switch(resultid)
	{
	    case THREAD_LOAD_HOUSES:
	    {
	        if(szRows)
	        {
	            new temp[130], totalhouses;
	            for(new i = 0; i < szRows; i++)
    			{
					new houseID;

					cache_get_field_content(i, "HouseIDz",   temp);
					houseID = strval(temp);
					
					cache_get_field_content(i, "house_Tag", temp);
                    format(HouseData[houseID][house_Tag], 50, "%s", temp);
                    
                    cache_get_field_content(i, "house_Owner", temp);
                    format(HouseData[houseID][house_Owner], 50, "%s", temp);

					cache_get_field_content(i, "house_X", temp);
					HouseData[houseID][house_OutsidePosition][0] = floatstr(temp);
					cache_get_field_content(i, "house_Y", temp);
					HouseData[houseID][house_OutsidePosition][1] = floatstr(temp);
					cache_get_field_content(i, "house_Z", temp);
					HouseData[houseID][house_OutsidePosition][2] = floatstr(temp);
					cache_get_field_content(i, "house_A", temp);
					HouseData[houseID][house_OutsidePosition][3] = floatstr(temp);
					
					cache_get_field_content(i, "house_Owned",   temp);
					HouseData[houseID][house_Owned] = strval(temp);

					cache_get_field_content(i, "house_Value", temp);
					HouseData[houseID][house_Value] = strval(temp);
					
					cache_get_field_content(i, "house_Level", temp);
					HouseData[houseID][house_Level] = strval(temp);
					
					cache_get_field_content(i, "house_Locked", temp);
					HouseData[houseID][house_Locked] = strval(temp);
					
					cache_get_field_content(i, "house_OutsideINT", temp);
					HouseData[houseID][house_OutsideVW] = strval(temp);
					
					cache_get_field_content(i, "house_OutsideINT", temp);
					HouseData[houseID][house_OutsideINT] = strval(temp);
					
					
					HouseData[houseID][house_Taken] = 1;
					
					SetHouseInterior(houseID);
    				UpdateHouseLabel(houseID);
    				totalhouses ++;
	    		}
	    		printf("Chill Role Play - Loaded %i houses", totalhouses);
	        }
	    }
Reply


Messages In This Thread
Mysql Login System[Problem] - by EgyptForLife - 21.05.2014, 17:03
Re: Mysql Login System[Problem] - by EgyptForLife - 21.05.2014, 19:17
Re: Mysql Login System[Problem] - by Koala818 - 21.05.2014, 19:22
Re: Mysql Login System[Problem] - by EgyptForLife - 21.05.2014, 19:26
Re: Mysql Login System[Problem] - by Koala818 - 21.05.2014, 19:30
Re: Mysql Login System[Problem] - by EgyptForLife - 21.05.2014, 19:34
Re: Mysql Login System[Problem] - by Koala818 - 21.05.2014, 19:37
Re: Mysql Login System[Problem] - by EgyptForLife - 21.05.2014, 19:39
Re: Mysql Login System[Problem] - by EgyptForLife - 21.05.2014, 21:15
Re: Mysql Login System[Problem] - by AndySedeyn - 21.05.2014, 21:26

Forum Jump:


Users browsing this thread: 1 Guest(s)