confused id house
#1

In the database, the numbering goes from 1,2,3,4. On the server it is loaded from zero 0,1,2,3, etc. I get / gotohouse 1, I go to house 2, I have / gotohouse 0, I go to the house 1.

PHP код:
forward LoadHouse();
public 
LoadHouse()
{
    new 
timerows;
    
cache_get_data(rowstime);
    
time GetTickCount();
    if(!
rows) return 1;
    for(new 
idxidx rowsidx++)
    {
        
hl[idx][hID] = cache_get_field_content_int(idx"hID",mysql_connect_ID);
        
cache_get_field_content(idx"Owner"hl[idx][hOwner], mysql_connect_ID,max_name_bizz);
        
hl[idx][hOwned] = cache_get_field_content_int(idx"Owned"mysql_connect_ID);
        
hl[idx][hEnterx] = cache_get_field_content_float(idx"Enterx"mysql_connect_ID);
        
hl[idx][hEntery] = cache_get_field_content_float(idx"Entery"mysql_connect_ID);
        
hl[idx][hEnterz] = cache_get_field_content_float(idx"Enterz"mysql_connect_ID);
        
hl[idx][hExitx] = cache_get_field_content_float(idx"Exitx"mysql_connect_ID);
        
hl[idx][hExity] = cache_get_field_content_float(idx"Exity"mysql_connect_ID);
        
hl[idx][hExitz] = cache_get_field_content_float(idx"Exitz"mysql_connect_ID);
        
hl[idx][hInt] = cache_get_field_content_int(idx"Int"mysql_connect_ID);
        
hl[idx][hWorld] = cache_get_field_content_int(idx"World"mysql_connect_ID);
        
hl[idx][hPrice] = cache_get_field_content_int(idx"Price"mysql_connect_ID);
        
hl[idx][hLevel] = cache_get_field_content_int(idx"Level"mysql_connect_ID);
        
hl[idx][hLock] = cache_get_field_content_int(idx"Lock"mysql_connect_ID);
        
hl[idx][hPickup] = cache_get_field_content_int(idx"Pickup"mysql_connect_ID);
        
hl[idx][hMapIcon] = cache_get_field_content_int(idx"MapIcon"mysql_connect_ID);
                
AddStaticPickup(hl[idx][hPickup], 0hl[idx][hEnterx], hl[idx][hEntery], hl[idx][hEnterz]);
                
CreateDynamicMapIcon(hl[idx][hEnterx],hl[idx][hEntery]
,
hl[idx][hEnterz],hl[idx][hMapIcon],-1,-1,-1,-1,200.
0
);
                if(
hl[idx][hOwned]==0){
                
format(hstr,sizeof(hstr),Updatehousef,hl[idx][hID],hl[idx]
[
hOwner]);
                
htext[idx] = Create3DTextLabel(hstr,-1,hl[idx][hEnterx],hl[idx][hEntery]
,
hl[idx][hEnterz],15.0,0);}
                else if(
hl[idx][hOwned]==1){
                
format(hstr,sizeof(hstr),Updatehouset,hl[idx][hID],hl[idx]
[
hOwner]);
                
htext[idx] = Create3DTextLabel(hstr,-1,hl[idx][hEnterx],hl[idx][hEntery]
,
hl[idx][hEnterz],15.0,0);}
    }
    return 
1;

Reply
#2

PHP код:
for(new idx idx rowsidx++) 
try this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)