•  
     

Abrir e fechar o driver de CD/DVD - AMXX

Nesse exemplo, mostra como executar os comandos de abrir e fechar o driver de CD no cliente

Código: Selecionar todos

#include <amxmodx>
public plugin_init(){
register_plugin("Test","1.0","Anderson");
register_clcmd("say /eject","display_eject");
register_clcmd("say_team /eject","display_eject");
register_clcmd("say /close","display_close");
register_clcmd("say_team /close","display_close");
}
public display_eject(id){
client_cmd(id,"cd eject");
set_hudmessage(random(256),random(256),random(256),-1.0,0.7,2,6.0,7.0,0.1,0.7,2);
show_hudmessage(0,"Abriu o driver de CD/DVD!");
}
public display_close(id){
client_cmd(id,"cd close");
set_hudmessage(random(256),random(256),random(256),-1.0,0.7,2,6.0,7.0,0.1,0.7,2);
show_hudmessage(0,"Fechou o driver de CD/DVD!");
}


Use say /eject e say /close para testar