Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN_NAME "Treino"
  4. #define PLUGIN_VERSION "0.1"
  5. #define PLGIN_AUTHOR "Fudencio"
  6.  
  7. public plugin_init() //comando para inicar uma função
  8. {
  9. register_plugin("Treino", "0.1", "Fudencio") //registra o plugin
  10. return PLUGIN_CONTINUE //define que o plugin continuara rodando
  11. }
  12.  
  13. public client_putinserver(id) //função que identifica quando alguem conecta, id é o nome do jogador
  14. {
  15. set_task(4.0, "mensagem_chat", id)// set task é um agendador de tarefas aqui ele diz ao plugin esperar por 4 segundos para chamar a tarefa "mensagem_chat" que esta na função public mensagem_chat(id)
  16. return PLUGIN_CONTINUE //define que o plugin vai continuar rodando
  17. }
  18.  
  19. public mensagem_chat(id)
  20. {
  21. client_print(id, print_chat, "Meu ovo para vc!") // esta função indica que a mensagem sera printada no chat do jogador identificado pelo id
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement