Witam potrzebuje pluginu na jailbreak dzięki któremu po wpisaniu /box włącza friendlyfire tylko dla więźniów po wpisaniu ponownie komendy box odnawia im hp. Chce aby tę komendę mogli używać tylko ct i admin.
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|

Box jailbreak!
#1
Napisano 02.03.2016 12:10
#2
Napisano 02.03.2016 15:36
Co ty masz za JB który nie ma boxa ? 0.0 Jak od cypisa to musisz mieć w /menu
#3
Napisano 02.03.2016 15:42
Zachostuje komus serwery TS3. 51012506.
Pomogłem? Daj Lubie to ! Ciebie to nic nie kosztuje a mnie motywuje do dalszej pomocy
#4
Napisano 03.03.2016 00:46
Co ty masz za JB który nie ma boxa ? 0.0 Jak od cypisa to musisz mieć w /menu
Mam jb w którym jest tryb walki a szukam takiego boxu jak opisałem wyżej
tu nie odnawia się hp po ponownym wpisaniu box i admin nie umie go wlączyć będąc w tt.
Jakieś propozycje ?
#5
Napisano 03.03.2016 11:47
To nie znajdziesz takieego luginu zleć komuś do napisania. Ja mam box wlaczany przez menu.
Zachostuje komus serwery TS3. 51012506.
Pomogłem? Daj Lubie to ! Ciebie to nic nie kosztuje a mnie motywuje do dalszej pomocy
#6
Napisano 07.03.2016 18:34
okey znalazłem mógłby ktoś jeszcze przerobić aby admin też umiał włączyć box.
#include <amxmodx> #include <cstrike> #include <colorchat> #include <fakemeta_util> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" new const plugin_info [] [] = { "Jailbreak Box", "v1.0", "CheezPuff & Hyuna" }; public plugin_init() { register_plugin(plugin_info[0], plugin_info[1], plugin_info[2]); register_clcmd( "say /box", "cmdBox" ); register_logevent( "CmdRoundStart", 2, "1=Round_Start" ); } public CmdRoundStart() { server_cmd( "mp_friendlyfire 0" ); } public cmdBox( id ) { if ( !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_CT ) { ColorChat( id, RED, "[AMXX] ^1You must to be^x03 Alive Guards^x01 to do this command."); return 1; } else { new iMenu = menu_create( "\r[AMXX] \wJailBreak Box Menu \d/*Built By \rCheezPuff\d\*", "sub_box" ); menu_additem(iMenu, "\wBox \yActive", "1", 0); menu_additem(iMenu, "\wBox \yDeactive", "2", 0); menu_additem(iMenu, "\wReset HP \d- \r[ \dEveryOne \r]", "3", 0); menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL ); menu_display(id, iMenu, 0); } return 1; } public sub_box(id, iMenu, item) { if( item == MENU_EXIT ) return 1; new szName[32]; get_user_name(id,szName,31); switch( item ) { case 0: { server_cmd( "mp_friendlyfire 1" ); 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 - Actived JailBreak Box",szName); } case 1: { server_cmd( "mp_friendlyfire 0" ); 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 - Disactived JailBreak Box",szName); } case 2: { new players[ 32 ], pnum; get_players( players, pnum, "ach" ); for(new i = 1; i <= pnum; i++) fm_set_user_health( i, 100 ); ColorChat( id, RED, "[AMXX] ^4%s^1 has reseted HP for everyone!",szName); } } return 1; }
#7
Napisano 09.03.2016 20:45
#include <amxmodx> #include <cstrike> #include <colorchat> #include <fakemeta_util> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" new const plugin_info [] [] = { "Jailbreak Box", "v1.0", "CheezPuff & Hyuna" }; public plugin_init() { register_plugin(plugin_info[0], plugin_info[1], plugin_info[2]); register_clcmd( "say /box", "cmdBox" ); register_logevent( "CmdRoundStart", 2, "1=Round_Start" ); } public CmdRoundStart() { server_cmd( "mp_friendlyfire 0" ); } public cmdBox( id ) { if ( !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_CT || get_user_flags(id) & ADMIN_BAN ) { ColorChat( id, RED, "[AMXX] ^1You must to be^x03 Alive Guards^x01 to do this command."); return 1; } else { new iMenu = menu_create( "\r[AMXX] \wJailBreak Box Menu \d/*Built By \rCheezPuff\d\*", "sub_box" ); menu_additem(iMenu, "\wBox \yActive", "1", 0); menu_additem(iMenu, "\wBox \yDeactive", "2", 0); menu_additem(iMenu, "\wReset HP \d- \r[ \dEveryOne \r]", "3", 0); menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL ); menu_display(id, iMenu, 0); } return 1; } public sub_box(id, iMenu, item) { if( item == MENU_EXIT ) return 1; new szName[32]; get_user_name(id,szName,31); switch( item ) { case 0: { server_cmd( "mp_friendlyfire 1" ); 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 - Actived JailBreak Box",szName); } case 1: { server_cmd( "mp_friendlyfire 0" ); 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 - Disactived JailBreak Box",szName); } case 2: { new players[ 32 ], pnum; get_players( players, pnum, "ach" ); for(new i = 1; i <= pnum; i++) fm_set_user_health( i, 100 ); ColorChat( id, RED, "[AMXX] ^4%s^1 has reseted HP for everyone!",szName); } } return 1; }
Łap admin musi posiadać flagę banowania aby odpalić
#8
Napisano 13.03.2016 11:16
Zrobiłem tak samo tylko że z poprawionym pluginem i wyskakuje błąd a podmieniłem tą linię
if ( !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_CT || get_user_flags(id) & ADMIN_BAN )
A o to ten plugin
#include < amxmodx > #include < cstrike > #include < fakemeta_util > #include < hamsandwich > #include < ColorChat > #define PLUGIN "Jailbreak Box Menu" #define VERSION "1.3" #define AUTHOR "CheezPuff aka *** For Fun ;]" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd( "say /box", "cmdBox" ); register_logevent( "CmdRoundStart", 2, "1=Round_Start" ); RegisterHam( Ham_TakeDamage, "player", "HamTakeDamage" ); } public CmdRoundStart() { server_cmd( "mp_friendlyfire 0" ); } public cmdBox( client ) { if ( !is_user_alive( client ) || cs_get_user_team( client ) != CS_TEAM_CT ) { ColorChat( client, GREEN, "[Jailbreak] ^1You must to be^x03 Alive Guards^x01 to do this^x04 command."); return 1; } new szMenu[ 50 ], iMenu; formatex( szMenu, charsmax( szMenu ), "\r[Jailbreak] \wBox Menu \d/*Built By \yCheezPuff\d"); iMenu = menu_create( szMenu, "sub_boxmenu" ); menu_additem( iMenu, "Box \yActive"); menu_additem( iMenu, "Box \yDeactive^n"); menu_additem( iMenu, "Reset Health : \r[ \wTerrorist \r]" ); menu_display( client, iMenu, 0 ); return PLUGIN_HANDLED; } public sub_boxmenu(client, iMenu, item) { if ( cs_get_user_team( client ) != CS_TEAM_CT ) { ColorChat( client, GREEN, "[Jailbreak] ^3Error:^1 You have^x03 no access^x01 to this command."); return 1; } if( item == MENU_EXIT || !is_user_alive(client)) return 1; switch (item) { case 0: { server_cmd( "mp_friendlyfire 1" ); set_hudmessage( 0, 85, 255, 0.05, 0.54, 1, 1.0, 1.5 ); show_hudmessage(client, "%s has Enable the Box.", GetUserName( client ) ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s ^1has^4 Enable^1 the ^4Box.", GetUserName( client ) ); cmdBox(client) } case 1: { server_cmd( "mp_friendlyfire 0" ); set_hudmessage( 0, 85, 255, 0.05, 0.54, 1, 3.0, 5.0 ); show_hudmessage(client, "%s has Disable the Box.", GetUserName( client ) ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s ^1has^4 Disable^1 the ^4Box.", GetUserName( client ) ); cmdBox(client) } case 2: { new players[ 32 ], num; get_players( players, num, "aceh", "TERRORIST" ); for ( new i = 0; i < num; i++ ) fm_set_user_health( players[ i ], 100 ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s^1 has Reseted HP To ^4Prisoner's^1 Team!",GetUserName( client )); cmdBox(client) } } return 1; } public HamTakeDamage( victim, inflictor, attacker, Float:damage, damagebits ) { if ( attacker == victim || !is_user_alive( attacker ) || !is_user_alive( victim )) return HAM_IGNORED; return ( cs_get_user_team( attacker ) == CS_TEAM_CT && cs_get_user_team( victim ) == cs_get_user_team( attacker ) ? HAM_SUPERCEDE : HAM_IGNORED); } stock GetUserName( index ) { static name[ 32 ]; get_user_name( index, name, charsmax( name ) ); return name; }
Użytkownik Qwiker edytował ten post 13.03.2016 11:17
#9
Napisano 13.03.2016 12:38
Zrobiłem tak samo tylko że z poprawionym pluginem i wyskakuje błąd a podmieniłem tą linię
if ( !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_CT || get_user_flags(id) & ADMIN_BAN )
A o to ten plugin
#include < amxmodx > #include < cstrike > #include < fakemeta_util > #include < hamsandwich > #include < ColorChat > #define PLUGIN "Jailbreak Box Menu" #define VERSION "1.3" #define AUTHOR "CheezPuff aka *** For Fun ;]" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd( "say /box", "cmdBox" ); register_logevent( "CmdRoundStart", 2, "1=Round_Start" ); RegisterHam( Ham_TakeDamage, "player", "HamTakeDamage" ); } public CmdRoundStart() { server_cmd( "mp_friendlyfire 0" ); } public cmdBox( client ) { if ( !is_user_alive( client ) || cs_get_user_team( client ) != CS_TEAM_CT ) { ColorChat( client, GREEN, "[Jailbreak] ^1You must to be^x03 Alive Guards^x01 to do this^x04 command."); return 1; } new szMenu[ 50 ], iMenu; formatex( szMenu, charsmax( szMenu ), "\r[Jailbreak] \wBox Menu \d/*Built By \yCheezPuff\d"); iMenu = menu_create( szMenu, "sub_boxmenu" ); menu_additem( iMenu, "Box \yActive"); menu_additem( iMenu, "Box \yDeactive^n"); menu_additem( iMenu, "Reset Health : \r[ \wTerrorist \r]" ); menu_display( client, iMenu, 0 ); return PLUGIN_HANDLED; } public sub_boxmenu(client, iMenu, item) { if ( cs_get_user_team( client ) != CS_TEAM_CT ) { ColorChat( client, GREEN, "[Jailbreak] ^3Error:^1 You have^x03 no access^x01 to this command."); return 1; } if( item == MENU_EXIT || !is_user_alive(client)) return 1; switch (item) { case 0: { server_cmd( "mp_friendlyfire 1" ); set_hudmessage( 0, 85, 255, 0.05, 0.54, 1, 1.0, 1.5 ); show_hudmessage(client, "%s has Enable the Box.", GetUserName( client ) ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s ^1has^4 Enable^1 the ^4Box.", GetUserName( client ) ); cmdBox(client) } case 1: { server_cmd( "mp_friendlyfire 0" ); set_hudmessage( 0, 85, 255, 0.05, 0.54, 1, 3.0, 5.0 ); show_hudmessage(client, "%s has Disable the Box.", GetUserName( client ) ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s ^1has^4 Disable^1 the ^4Box.", GetUserName( client ) ); cmdBox(client) } case 2: { new players[ 32 ], num; get_players( players, num, "aceh", "TERRORIST" ); for ( new i = 0; i < num; i++ ) fm_set_user_health( players[ i ], 100 ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s^1 has Reseted HP To ^4Prisoner's^1 Team!",GetUserName( client )); cmdBox(client) } } return 1; } public HamTakeDamage( victim, inflictor, attacker, Float:damage, damagebits ) { if ( attacker == victim || !is_user_alive( attacker ) || !is_user_alive( victim )) return HAM_IGNORED; return ( cs_get_user_team( attacker ) == CS_TEAM_CT && cs_get_user_team( victim ) == cs_get_user_team( attacker ) ? HAM_SUPERCEDE : HAM_IGNORED); } stock GetUserName( index ) { static name[ 32 ]; get_user_name( index, name, charsmax( name ) ); return name; }
#include < amxmodx > #include < cstrike > #include < fakemeta_util > #include < hamsandwich > #include < ColorChat > #define PLUGIN "Jailbreak Box Menu" #define VERSION "1.3" #define AUTHOR "CheezPuff aka *** For Fun ;]" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd( "say /box", "cmdBox" ); register_logevent( "CmdRoundStart", 2, "1=Round_Start" ); RegisterHam( Ham_TakeDamage, "player", "HamTakeDamage" ); } public CmdRoundStart() { server_cmd( "mp_friendlyfire 0" ); } public cmdBox( client ) { if ( !is_user_alive( client ) || cs_get_user_team( client ) != CS_TEAM_CT || get_user_flags( client ) & ADMIN_BAN ) { ColorChat( client, GREEN, "[Jailbreak] ^1You must to be^x03 Alive Guards^x01 to do this^x04 command."); return 1; } new szMenu[ 50 ], iMenu; formatex( szMenu, charsmax( szMenu ), "\r[Jailbreak] \wBox Menu \d/*Built By \yCheezPuff\d"); iMenu = menu_create( szMenu, "sub_boxmenu" ); menu_additem( iMenu, "Box \yActive"); menu_additem( iMenu, "Box \yDeactive^n"); menu_additem( iMenu, "Reset Health : \r[ \wTerrorist \r]" ); menu_display( client, iMenu, 0 ); return PLUGIN_HANDLED; } public sub_boxmenu(client, iMenu, item) { if ( cs_get_user_team( client ) != CS_TEAM_CT ) { ColorChat( client, GREEN, "[Jailbreak] ^3Error:^1 You have^x03 no access^x01 to this command."); return 1; } if( item == MENU_EXIT || !is_user_alive(client)) return 1; switch (item) { case 0: { server_cmd( "mp_friendlyfire 1" ); set_hudmessage( 0, 85, 255, 0.05, 0.54, 1, 1.0, 1.5 ); show_hudmessage(client, "%s has Enable the Box.", GetUserName( client ) ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s ^1has^4 Enable^1 the ^4Box.", GetUserName( client ) ); cmdBox(client) } case 1: { server_cmd( "mp_friendlyfire 0" ); set_hudmessage( 0, 85, 255, 0.05, 0.54, 1, 3.0, 5.0 ); show_hudmessage(client, "%s has Disable the Box.", GetUserName( client ) ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s ^1has^4 Disable^1 the ^4Box.", GetUserName( client ) ); cmdBox(client) } case 2: { new players[ 32 ], num; get_players( players, num, "aceh", "TERRORIST" ); for ( new i = 0; i < num; i++ ) fm_set_user_health( players[ i ], 100 ); ColorChat( 0, GREEN, "[Jailbreak]^3 %s^1 has Reseted HP To ^4Prisoner's^1 Team!",GetUserName( client )); cmdBox(client) } } return 1; } public HamTakeDamage( victim, inflictor, attacker, Float:damage, damagebits ) { if ( attacker == victim || !is_user_alive( attacker ) || !is_user_alive( victim )) return HAM_IGNORED; return ( cs_get_user_team( attacker ) == CS_TEAM_CT && cs_get_user_team( victim ) == cs_get_user_team( attacker ) ? HAM_SUPERCEDE : HAM_IGNORED); } stock GetUserName( index ) { static name[ 32 ]; get_user_name( index, name, charsmax( name ) ); return name; }
hmm?
#10
Napisano 13.03.2016 14:06
hmm?
Nie działa po próbie wpisania komendy /box nawet jako admin i będąc w ct pisze "You must to be Alive Guards to do this use command"
#11
Napisano 13.03.2016 15:17
a wgraj oryginalny kod który podałeś wyżej i spr czy działa bez przeróbek
#12
Napisano 13.03.2016 15:45
sprawdzałem oryginalny kod działa
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych