20.09.2018, 17:31
The code will not compile as the first parameter of function offlineban takes a string (player's name) as argument but in the function itself, you have it as integer and have variables for it. This will not work for offline, here is what you should do:
Your sscanf specifiers are also wrong. You never store to ban_reason or ban_time.
- Execute a SELECT query to fetch the last ip used by the said player and pass in mysql_tquery callback parameters (admin's name, reason)
- No rows? Player does not exist in database
- Rows found? Retrieve ip, format a new query with all the information you now have and execute the INSERT query.
Your sscanf specifiers are also wrong. You never store to ban_reason or ban_time.