Dynamic Pickups not spawning
#1

I create them IG with a command. They show up and save to MySQL. When I load the gamemode, I use this to load them:

pawn Код:
forward LoadEntrances();
public LoadEntrances()
{
    if(cache_num_rows())
    {
        for(new i = 0; i<cache_num_rows(); i++)
        {
           
            new eid = cache_get_field_content_int(i, "ID", mysql);
            Entrance[eid][ID] = eid;
            Entrance[eid][posX] = cache_get_field_content_float(i, "PosX", mysql);
            Entrance[eid][posY] = cache_get_field_content_float(i, "PosY", mysql);
            Entrance[eid][posZ] = cache_get_field_content_float(i, "PosZ", mysql);
            Entrance[eid][posX] = cache_get_field_content_float(i, "iPosX", mysql);
            Entrance[eid][posY] = cache_get_field_content_float(i, "iPosY", mysql);
            Entrance[eid][posZ] = cache_get_field_content_float(i, "iPosZ", mysql);
            Entrance[eid][VW] = cache_get_field_content_int(i, "VW", mysql);
            Entrance[eid][Interior] = cache_get_field_content_int(i, "Interior", mysql);
            Entrance[eid][ID] = CreateDynamicPickup(1318, 1, Entrance[eid][posX], Entrance[eid][posY], Entrance[eid][posZ]);
            Total_Entrances_Created ++;
            printf("[MYSQL] Loading Entrance %d", Entrance[eid][ID]);
        }
    }
    printf("[MYSQL]: %d Entrances have been successfully loaded from the database.", Total_Entrances_Created);
    return 1;
}
It's printing that they have been loaded successfully.
Reply
#2

PHP код:
            Entrance[eid][posX] = cache_get_field_content_float(i"PosX"mysql);
            
Entrance[eid][posY] = cache_get_field_content_float(i"PosY"mysql);
            
Entrance[eid][posZ] = cache_get_field_content_float(i"PosZ"mysql);
            
Entrance[eid][posX] = cache_get_field_content_float(i"iPosX"mysql);
            
Entrance[eid][posY] = cache_get_field_content_float(i"iPosY"mysql);
            
Entrance[eid][posZ] = cache_get_field_content_float(i"iPosZ"mysql); 
Silly bug.
You are saving iPosX, iPosY and iPosZ to posX, posY, posZ variables.
Reply
#3

Oh yea, stupid me.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)