Lean1337

Untitled

Jul 29th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. forward GetNextFurnitureID();
  2. public GetNextFurnitureID()
  3. {
  4.  
  5. new ottquery[128];
  6. for(new x = 1; x < MAX_FURNITURES; x++)
  7. {
  8. mysql_format(mysql, ottquery, sizeof(ottquery), "SELECT * FROM `seb-furniture` WHERE `fID` = %d", x);
  9. mysql_tquery(mysql, ottquery, "DoesFExist", "i", x);
  10. }
  11. return 1;
  12. }
  13.  
  14. forward DoesFExist(fID);
  15. public DoesFExist(fID)
  16. {
  17. new rows, fields,string[128];
  18. cache_get_data(rows, fields, mysql);
  19. if(rows)
  20. {
  21.  
  22. }
  23. if(!rows)
  24. {
  25. format(string,sizeof(string),"%d DOES NOT EXIST",fID);
  26. SendClientMessageToAll(COLOR_LIGHTRED, string);
  27. return fID;
  28. }
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment