LVPYassine

Untitled

Jan 17th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. CMD:unban(playerid, params[])
  2. {
  3. if(pData[playerid][Admin] >=1)
  4. {
  5. if(!isnull(params))
  6. {
  7. new Cache:result,query2[128];
  8. format(query2, 128, "SELECT * FROM `banlist` WHERE `name` = '%s'", params);
  9. result = mysql_query(register, query2);
  10. new rows;
  11. cache_get_row_count(rows);
  12. if(!rows) return SendClientMessage(playerid, -1, "Error: this account Not Banned!");
  13.  
  14. new querys[128], string[150];
  15. format(querys, 128, "DELETE FROM `banlist` WHERE name = '%s'", params);
  16. mysql_query(register, querys);
  17. SendClientMessage(playerid, -1, "Success: this account unbanned!");
  18. cache_delete(result);
  19. }
  20. else return SendClientMessage(playerid, -1,"USAGE: /unban [NickName]");
  21. }
  22. else return SendClientMessage(playerid, -1, "Error: You are not an Administrator!");
  23. return 1;
  24. }
Add Comment
Please, Sign In to add comment