MegastoRM

Untitled

Mar 16th, 2013
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "author"
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_concmd("amx_transfer", "cmd_transfer", _, "<num>", 0)
  13. register_cvar("transfer_time","5.0")
  14. // Add your code here...
  15. }
  16.  
  17. public cmd_transfer(id, level, cid)
  18. {
  19. static arg[32], num, Float:cvar_value
  20. cvar_value = get_cvar_float("transfer_time")
  21. read_argv(1, arg, charsmax(arg))
  22.  
  23. for(new i = 0; i < get_maxplayers();i++)
  24. {
  25. if(is_user_connected(i))
  26. num++
  27. }
  28. if(str_to_num(arg) >= num)
  29. return PLUGIN_HANDLED
  30.  
  31. for(new i = 1; i <= num;i++)
  32. {
  33. set_task(cvar_value,"task_redirect", i+384)
  34. }
  35.  
  36. return PLUGIN_HANDLED;
  37. }
  38.  
  39. public task_redirect(id)
  40. {
  41. id-=384
  42. client_cmd(id, "")
  43. }
Advertisement
Add Comment
Please, Sign In to add comment