RSSy MYGO.pl Opublikowano Luty 28, 2020 o 14:09 RSSy Udostępnij Opublikowano Luty 28, 2020 o 14:09 Hello AlliedModders! Is it possible to add some features to this Jail plugin. The command for jailing a player is amx_jail <name | #userid> , in order to be like: amx_jail <name |# userid> <minutes> [reason]. Then if possible, the reason and the remaining time in center HUD (green color) of the player, who is jailed. In case of players who are trying to avoid the jail.. adding "kill" command block,change team "M" block and in case the player reconnects to remain in the jail till the time is up. Thank you all in advance! I would be so thankful! Code: #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <fakemeta_util> #define PLUGIN "Jail" #define VERSION "1.0" #define AUTHOR "Unknown" new Float:g_jail_origin[3]; new bool:g_jail_exists; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_concmd("amx_jail", "cmd_jail", ADMIN_RCON, "< name | #userid > Place player in jail!") new jailfile[64]; get_configsdir(jailfile, sizeof(jailfile) - 1); add(jailfile, sizeof(jailfile) - 1, "/jails.ini"); if( !file_exists(jailfile) ) return; new curmap[64]; get_mapname(curmap, sizeof(curmap) - 1); new f = fopen(jailfile, "rt"); new data[128], map[64], x[16], y[16], z[16]; while( !feof(f) ) { fgets(f, data, sizeof(data) - 1); if( !data[0] || data[0] == ';' || data[0] == '/' && data[1] == '/' ) continue; parse(data, map, sizeof(map) - 1, x, sizeof(x) - 1, y, sizeof(y) - 1, z, sizeof(z) - 1 ); if( !strcmp(curmap, map) ) { g_jail_origin[0] = str_to_float(x); g_jail_origin[1] = str_to_float(y); g_jail_origin[2] = str_to_float(z); g_jail_exists = true; break; } } fclose(f); } public cmd_jail(id, level, cid) { if (!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED if( !g_jail_exists ) { console_print(id, "Jail does not exist for this map!"); return PLUGIN_HANDLED; } new Argument[32] read_argv(1, Argument, 31) new Target = cmd_target(id, Argument, CMDTARGET_ALLOW_SELF) if (Target) { fm_strip_user_weapons(Target) set_pev(Target, pev_origin, g_jail_origin); } return PLUGIN_HANDLED } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi