Quote:
Originally Posted by fysiks
PHP Code:
register_cvar("mp_friendlyfire", "mp_friendlyfire")
No because 1) The cvar already exists and 2) the value is an integer.
|
Thanks.
Quote:
Originally Posted by wlmraziel
Hi, there are a plugin for check if in the server the mp_friendlyfire is on? In this case the plugin can disable the mp_friendlyfire.
Solved.
|
You can use this:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Anti-FriendlyFire"
#define VERSION "1.1"
#define AUTHOR "WhiteFang"
new gFriendlyfire
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("new_round", 2, "1=Round_Start")
gFriendlyfire = get_cvar_pointer("mp_friendlyfire")
}
public new_round()
{
//Setting Friendlyfire 0 on new round
set_pcvar_num(gFriendlyfire,0)
}