Advertisement
ObtiMus

OpenCells

Aug 4th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <cstrike>
  4. #include <dhudmessage>
  5.  
  6. #define PREFIX "CaNoIL"
  7. #define ADMIN_FLAG ADMIN_KICK
  8.  
  9. public plugin_init() {
  10.  
  11. register_clcmd("say /open", "open_cells")
  12. }
  13.  
  14. public open_cells(id)
  15. {
  16. if(cs_get_user_team(id) == CS_TEAM_CT)
  17. {
  18. new szGuardName[32]
  19. get_user_name(id, szGuardName, charsmax(szGuardName))
  20.  
  21. set_dhudmessage(random(255), random(255), random(255), -1.0, -1.0, 0, 0.0, 1.1, 0.1, 0.1, 1);
  22. show_dhudmessage(0, "[%s]^n Guard %s open the cells! =", PREFIX, szGuardName)
  23.  
  24. while(engfunc(EngFunc_FindEntityByString, -1, "classname", "func_door"))
  25. {
  26. dllfunc(DLLFunc_Use, -1, 0)
  27. }
  28. }
  29. else if ( get_user_flags(id) & ADMIN_FLAG )
  30. {
  31. new szGuardName[32]
  32. get_user_name(id, szGuardName, charsmax(szGuardName))
  33.  
  34. set_dhudmessage(random(255), random(255), random(255), -1.0, -1.0, 0, 0.0, 1.1, 0.1, 0.1, 1);
  35. show_dhudmessage(0, "[%s]^n Admin %s open the cells =", PREFIX, szGuardName)
  36.  
  37. while(engfunc(EngFunc_FindEntityByString, -1, "classname", "func_door"))
  38. {
  39. dllfunc(DLLFunc_Use, -1, 0)
  40.  
  41. }
  42. }
  43.  
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement