House System Problem
#7

What does the following show you in server log:
PHP код:
format(stringsizeof(string), "House %d, x: %d, y:%d, z:%d"idhInfo[id][hEnterX], hInfo[id][hEnterY], hInfo[id][hEnterZ]); 
are the coords correct?

I have had this problem once.
try this:
PHP код:
forward LoadHouses();
public 
LoadHouses()
{
    new 
rows;
    
cache_get_row_count(rows);
    
    new 
Float:XFloat:YFloat:Z;

    if(
rows)
    {
        new 
idloaded;
        for(new 
0rowsi++) {
            
cache_get_value_name_int(loaded"ID"id);
            
cache_get_value_name_float(loaded"EnterX"hInfo[id][hEnterX]);
            
cache_get_value_name_float(loaded"EnterY"hInfo[id][hEnterY]);
            
cache_get_value_name_float(loaded"EnterZ"hInfo[id][hEnterZ]);
            
cache_get_value_name_float(loaded"ExitX"hInfo[id][hExitX]);
            
cache_get_value_name_float(loaded"ExitX"hInfo[id][hExitY]);
            
cache_get_value_name_float(loaded"ExitY"hInfo[id][hExitZ]);
            
cache_get_value_name_float(loaded"ExitZ"hInfo[id][hExitX]);
            
cache_get_value_name_int(loaded"InsideInt"hInfo[id][hInsideInt]);
            
cache_get_value_name_int(loaded"InsideVir"hInfo[id][hInsideVir]);
            
cache_get_value_name_int(loaded"OutsideInt"hInfo[id][hOutsideInt]);
            
cache_get_value_name_int(loaded"Level"hInfo[id][hLevel]);
            
cache_get_value_name(loaded"Owner"hInfo[id][hOwner], 48);
            
cache_get_value_name_int(loaded"Price"hInfo[id][hPrice]);
            
            
hInfo[id][hEnterX];
            
hInfo[id][hEnterY];
            
hInfo[id][hEnterZ];

            new 
string[255];
            
format(stringsizeof(string), "House %d, x: %d, y:%d, z:%d"idhInfo[id][hEnterX], hInfo[id][hEnterY], hInfo[id][hEnterZ]);
            print(string);

            
loaded++;

            
hInfo[id][hPickup] = CreatePickup(12730XYZ, -1);
        }

        new 
string[255];
        
format(stringsizeof(string), "Loaded %d houses from Database."rows);
        print(string);
    }
    else
    {
        print(
"No house loaded on Database.");
        return 
1;
    }
    return 
1;

Reply


Messages In This Thread
House System Problem - by C0oL3r - 06.02.2018, 22:38
Re: House System Problem - by MarkNelson - 06.02.2018, 22:59
Re: House System Problem - by C0oL3r - 06.02.2018, 23:04
Re: House System Problem - by MarkNelson - 06.02.2018, 23:06
Re: House System Problem - by PepsiCola23 - 06.02.2018, 23:07
Re: House System Problem - by C0oL3r - 07.02.2018, 17:22
Re: House System Problem - by jasperschellekens - 07.02.2018, 17:56
Re: House System Problem - by C0oL3r - 07.02.2018, 18:05
Re: House System Problem - by jasperschellekens - 07.02.2018, 20:21
Re: House System Problem - by Mugala - 08.02.2018, 10:22

Forum Jump:


Users browsing this thread: 4 Guest(s)