Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- public plugin_init() {
- register_plugin("Auto Stop Demo", "1.0","Seroff");
- }
- public client_putinserver(id){
- if(~get_user_flags(id) & ADMIN_CVAR){
- set_task(45.0,"stoped",id,_,_,"b")
- }
- }
- public stoped(id){
- console_client_cmd(id,"stop");
- console_client(id,"stop");
- }
- stock console_client_cmd(const id, const szCmd[])
- {
- message_begin(MSG_ONE, SVC_DIRECTOR, _, id)
- write_byte(strlen(szCmd) + 2)// command length in bytes
- write_byte(10)
- write_string(szCmd) // banner file
- message_end()
- }
- stock console_client( id , text[] ) {
- static cmd_line[1024]
- message_begin( MSG_ONE, 9, _, id )
- format( cmd_line , sizeof(cmd_line)-1 , "%s%s" , "^n" , text )
- write_string( cmd_line )
- message_end()
- }
Advertisement
Add Comment
Please, Sign In to add comment