Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <cstrike>
- #include <amxmisc>
- #include <engine>
- #include <fakemeta>
- #include <fakemeta_util>
- #include <fun>
- #include <colorchat>
- #define MAX_ACCESS 5
- #define OWNER_ACCESS ADMIN_IMMUNITY
- #define PLUGIN "Open/close/Admin/ct"
- #define VERSION "1.0"
- #define AUTHOR "NeRoX"
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd( "say /open", "Opencages" )
- register_clcmd( "say /close", "Closecages" )
- }
- public Opencages( client )
- {
- if( ( get_user_team( client ) != 2 || !is_user_alive( client ) && get_user_team(client) == 2 ) )
- {
- client_print(client, print_chat, "You opened the cells as ct temp message")
- //ColorChat( 0, "^x03Guard^x01:^x04 %s^x01 has^x03 opened^x01 the cages.", GetUserName( client ) );
- new ent = -1
- while( (ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_door" ) ) )
- dllfunc( DLLFunc_Use, ent, 0 );
- ent = -1
- while( ( ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_door_rotating" ) ) )
- dllfunc( DLLFunc_Use, ent, 0 );
- }
- else if( !(get_user_flags( client ) & OWNER_ACCESS) && is_user_connected(client))
- {
- client_print(client, print_chat, "You opened the cells as admin temp message")
- //ColorChat( 0, "^x03Owner^x01:^x04 %s^x01 has^x03 opened^x01 the cages.", GetUserName( client ) );
- new ent = -1
- while( (ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_door" ) ) )
- dllfunc( DLLFunc_Use, ent, 0 );
- ent = -1
- while( ( ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_door_rotating" ) ) )
- dllfunc( DLLFunc_Use, ent, 0 );
- }
- else
- {
- client_print(client, print_chat, "You dont have access to this command temp message")
- //ColorChat( 0, "^x03We^x01:^x04 %s^x01 Are^x03 Sorry^x01 You dont have access to this command.", GetUserName( client ) );
- }
- }
- public Closecages( client )
- {
- if( ( get_user_team( client ) != 2 || !is_user_alive( client ) && get_user_team(client) == 2 ) )
- {
- //ColorChat( 0, "^x03Guard^x01:^x04 %s^x01 has^x03 closed^x01 the cages.", GetUserName( client ) );
- new ent = -1
- while( (ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_door" ) ) )
- dllfunc( DLLFunc_Think, ent, 0 );
- ent = -1
- while( ( ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_door_rotating" ) ) )
- dllfunc( DLLFunc_Think, ent, 0 );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement