Guest User

Untitled

a guest
Dec 19th, 2012
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. #define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)
  5.  
  6. public plugin_init() {
  7.  
  8. register_clcmd("say /open", "Open_Cells")
  9. register_clcmd("say_team /open", "Open_Cells")
  10. }
  11.  
  12. public Open_Cells(id)
  13. {
  14. if(get_user_team(id) == 2)
  15. {
  16. new PlayerName[32];
  17. get_user_name(id, PlayerName, 31)
  18. client_print( id, print_chat, "%s has open cell", PlayerName );
  19. set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.0, 0, 6.0, 12.0)
  20. show_hudmessage(0, "%s Has Open The Cells", PlayerName)
  21. new ent = -1
  22. while((ent = fm_find_ent_by_class(ent, "func_door")))
  23. {
  24. dllfunc(DLLFunc_Use, ent, 0)
  25. }
  26. }
  27. else
  28. {
  29. client_print( id, print_chat, "command is only for Counter-Strike" );
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment