+REP - Save SetPlayerAttachedObjects via MySQL
#8

pawn Код:
mysql_query("SELECT * FROM `clothes` WHERE Username='%s'", PlayerName);
    mysql_store_result();
    vTotal = mysql_num_rows();
    new totalclothes = 0;
    new c_Username[24], ModelID, BoneID, IndexID, etcID;
    if(vTotal > 0)
    {
        while(mysql_fetch_row(Str))
        {
            totalclothes++;
            sscanf(Str, "p<|>sdddd", c_Username, ModelID, BoneID, IndexID, etcID);
            //Now use this information, and attach/create the objects and put them onto the player (This will look for how many results it got from the query).
            //I highly doubt this will work. You will need to edit the int's, fields, etc first!!
        }
    }
    mysql_free_result(); //Don't forget this.
Hope I helped.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)