Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LoadDroppedItems()
- {
- new query[1024];
- mysql_format(MySQL, query, sizeof(query), "SELECT * FROM `items` WHERE `owner` = '-1';");
- mysql_tquery(MySQL, query, "OnDroppedItemsLoad", "");
- return 1;
- }
- public OnDroppedItemsLoad()
- {
- print("\n\n---------------------------");
- new rows = cache_num_rows();
- printf("num of rows = %d", rows);
- for(new d; d < rows; d++)
- {
- static id, model, amount, Float:x, Float:y, Float:z;
- id = cache_get_field_content_int(d, "id", MySQL);
- model = cache_get_field_content_int(d, "model", MySQL);
- amount = cache_get_field_content_int(d, "amount", MySQL);
- x = cache_get_field_content_float(d, "coord_x", MySQL);
- y = cache_get_field_content_float(d, "coord_y", MySQL);
- z = cache_get_field_content_float(d, "coord_z", MySQL);
- CreateDroppedItem(id, model, amount, x, y, z);
- #if defined DEBUGMSG
- new string[128];
- format(string, sizeof(string), "Loop %d retrieved item_id = %d and item_model = %d",d, id, model);
- print(string);
- #endif
- }
- print("---------------------------\n\n");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment