Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <fakemeta>
- #define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)
- public plugin_init() {
- register_clcmd("say /open", "Open_Cells")
- register_clcmd("say_team /open", "Open_Cells")
- }
- public Open_Cells(id)
- {
- if(get_user_team(id) == 2)
- {
- new PlayerName[32];
- get_user_name(id, PlayerName, 31)
- client_print( id, print_chat, "%s has open cell", PlayerName );
- set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.0, 0, 6.0, 12.0)
- show_hudmessage(0, "%s Has Open The Cells", PlayerName)
- new ent = -1
- while((ent = fm_find_ent_by_class(ent, "func_door")))
- {
- dllfunc(DLLFunc_Use, ent, 0)
- }
- }
- else
- {
- client_print( id, print_chat, "command is only for Counter-Strike" );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment