Guest User

Untitled

a guest
May 31st, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. stock GetGroupIDByName(name[])
  2. {
  3.  
  4. new query[128];
  5. new groupName[35];
  6. mysql_format(mysqlconnect, query, sizeof(query), "SELECT groupName FROM user_group WHERE groupName = '%s'", name);
  7. mysql_query(mysqlconnect, query, true);
  8. new count = cache_num_rows();
  9. if(count > 0)
  10. {
  11. for(new i = 0; i < count; i++)
  12. {
  13.  
  14. cache_get_value_name(0, "groupName", groupName);
  15. return groupName;
  16. }
  17. }
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment