AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [REQ] Ally/friend monster (monstermod) v3.0.0.7 (https://forums.alliedmods.net/showthread.php?t=144839)

oponing-force 12-08-2010 18:04

[REQ] Ally/friend monster (monstermod) v3.0.0.7
 
How to make monster stop attacking ? and become ct's friend ?

Drak 12-08-2010 18:06

Re: [REQ] Ally/friend monster (monstermod) v3.0.0.7
 
I guess give them cookies. I'd stop attacking kids after getting cookies.
I think there's a flag you can set. (IE: FL_FAKECLIENT etc) maybe FL_FROZEN.
If that doesn't work. I would stop the entity's think. That will disable the monster from doing anything.

On top of all that, I'm not sure if AMXX can control what happens within a metamod plugin.

oponing-force 12-08-2010 18:25

Re: [REQ] Ally/friend monster (monstermod) v3.0.0.7
 
with this plugin?

Quote:

/*

a user with notarget set on will not be attacked by monsters

credits: used godmode template from admin_allinone maintianed by BigBaller
* -) ADMIN GODEMODE v0.9.3 by f117bomb

*/

#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_modules()
{
require_module("engine")
}

public plugin_init()
{
register_plugin("Notarget", "0.1", "Seather")
register_concmd("amx_notarget","admin_notarge t",ADMIN_LEVEL_A,"<authid, nick, @team or #userid> <0=OFF 1=ON>")
}

public admin_notarget(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg[32], arg2[8], name2[32]
read_argv(1,arg,31)
read_argv(2,arg2,7)
get_user_name(id,name2,31)

if (str_to_num(arg2) != 0 && str_to_num(arg2) != 1) return PLUGIN_HANDLED

if (arg[0]=='@'){
new players[32], inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id, "no match")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a) {
//magic!
set_entity_flags(players[a],FL_NOTARGET,str_to_num(arg2))
}
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat, "ADMIN %s: set notarget on %s", name2, arg[1])
case 1: client_print(0,print_chat, "ADMIN: set notarget on %s", arg[1])
}
console_print(id, "no target set")
//log_amx("%L", LANG_SERVER, "AINO_LOG_GODMODE_ALL", name2, arg[1])
}
else {
new player = cmd_target(id,arg,3)
if (!player || (str_to_num(arg2) != 0 && str_to_num(arg2) != 1)) return PLUGIN_HANDLED

//magic!
set_entity_flags(player,FL_NOTARGET,str_to_nu m(arg2))

new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "ADMIN %s: set notarget on %s", name2, name)
case 1: client_print(0, print_chat, "ADMIN: set notarget on %s", name)
}
console_print(id, "Client ^"%s^" has notarget set", name)
}
return PLUGIN_HANDLED
}

Exolent[jNr] 12-08-2010 19:20

Re: [REQ] Ally/friend monster (monstermod) v3.0.0.7
 
Quote:

Originally Posted by Drak (Post 1366323)
On top of all that, I'm not sure if AMXX can control what happens within a metamod plugin.

Orpheu has MonsterMod support to where you can hook and execute it's functions the same as you would for the HLSDK.


All times are GMT -4. The time now is 23:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.