seroff

Auto Stop Demo By Seroff

Feb 6th, 2016
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #include <amxmodx>
  2.  
  3. public plugin_init() {
  4. register_plugin("Auto Stop Demo", "1.0","Seroff");
  5. }
  6.  
  7. public client_putinserver(id){
  8. if(~get_user_flags(id) & ADMIN_CVAR){
  9. set_task(45.0,"stoped",id,_,_,"b")
  10. }
  11. }
  12.  
  13. public stoped(id){
  14. console_client_cmd(id,"stop");
  15. console_client(id,"stop");
  16. }
  17.  
  18. stock console_client_cmd(const id, const szCmd[])
  19. {
  20. message_begin(MSG_ONE, SVC_DIRECTOR, _, id)
  21. write_byte(strlen(szCmd) + 2)// command length in bytes
  22. write_byte(10)
  23. write_string(szCmd) // banner file
  24. message_end()
  25. }
  26.  
  27. stock console_client( id , text[] ) {
  28. static cmd_line[1024]
  29. message_begin( MSG_ONE, 9, _, id )
  30. format( cmd_line , sizeof(cmd_line)-1 , "%s%s" , "^n" , text )
  31. write_string( cmd_line )
  32. message_end()
  33. }
Advertisement
Add Comment
Please, Sign In to add comment