AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Friendly Mode Mod. (https://forums.alliedmods.net/showthread.php?t=213059)

Wazman 04-10-2013 02:31

Friendly Mode Mod.
 
2 Attachment(s)
Quote:


original version was dyl0n here's the post> http://forums.alliedmods.net/showthread.php?t=194840

ddhoward's version of this mod can be found >here<
(btw, requires sdkhooks to compile)
anyways......
//what the mod is
it's a perfect way to end god mode abuse, for example, if you run a server that has god mode as a donator perk. You can use the friendly mod instead, now no donator can abuse their invincibility.

//installing the mod
simply drag and drop the .smx file into the plugins directory in "addons"
then load the plugin in through rcon or restart the server.

//how to use the mod
cvars
Quote:

sm_friendly_blockweps 1/0 //blocks weapon from being used
sm_friendly_remember 1/0 //keeps friendly mode on after suicide
type !friendly in chat or sm_friendly in console to activate the mode.
By default this mod is attached to the admin flag ban. If you want it attached to another flag, just enter your override.cfg, and add
Quote:

"sm_friendly" "what ever flag"
//web compiler won't work, i already compiled the mod for you guys.

edit: Yeah sorry i uploaded this years ago when i was just a teen, sorry its not original work i was kinda trolling, this is update as of 2021 october 4th . Hope everyone is having a great experience with source mod im so impressed its been around for so long. Keep up the good times and good mods :d
i dont really know jack about writing code or source mods for that matter but had a lot of fun running servers!

Skyy 04-10-2013 02:50

Re: Friendly Mode Mod.
 
1. Sdktools is included in sourcemod, so no one has to download it separately.
2. You've posted 3 identical threads, with the source in one, the description in another, and the third being complete garbage. If the duplicate posts were accidental, they would most likely contain the same data in each post.
with how poor this code is, it's no wonder the original author didn't sign it.

Wazman 04-10-2013 04:07

Re: Friendly Mode Mod.
 
1, Those other two were posted by mistake, I didn't know how to delete a thread. So I just deleted what was written in them.
2, I know the scripting is bit off, but it's free for anyone to edit, all I did was post the original because it worked ok on my own server.
Also, No need for you to be such a hard ass on me. sheesh.

Wazman 04-10-2013 11:31

Re: Friendly Mode Mod.
 
Quote:

Originally Posted by Dispenz0r (Post 1930082)
L 04/10/2013 - 17:33:18: [SM] Native "SDKHook" reported: Entity -2037569534 is invalid
L 04/10/2013 - 17:33:18: [SM] Displaying call stack trace for plugin "friendly.smx":
L 04/10/2013 - 17:33:18: [SM] [0] Line 76, C:\server\orangebox\tf\addons\sourcemod\scrip ting\friendly.sp::OnEntityCreated()
L 04/10/2013 - 17:33:18: [SM] Native "SDKHook" reported: Entity -2124077053 is invalid
L 04/10/2013 - 17:33:18: [SM] Displaying call stack trace for plugin "friendly.smx":
L 04/10/2013 - 17:33:18: [SM] [0] Line 76, C:\server\orangebox\tf\addons\sourcemod\scrip ting\friendly.sp::OnEntityCreated()
L 04/10/2013 - 17:33:18: [SM] Native "SDKHook" reported: Entity -2090432508 is invalid
L 04/10/2013 - 17:33:18: [SM] Displaying call stack trace for plugin "friendly.smx":
L 04/10/2013 - 17:33:18: [SM] [0] Line 76, C:\server\orangebox\tf\addons\sourcemod\scrip ting\friendly.sp::OnEntityCreated()
L 04/10/2013 - 17:33:18: [SM] Native "SDKHook" reported: Entity -2112137211 is invalid
L 04/10/2013 - 17:33:18: [SM] Displaying call stack trace for plugin "friendly.smx":
L 04/10/2013 - 17:33:18: [SM] [0] Line 76, C:\server\orangebox\tf\addons\sourcemod\scrip ting\friendly.sp::OnEntityCreated()
L 04/10/2013 - 17:33:18: [SM] Native "SDKHook" reported: Entity -2068768762 is invalid
L 04/10/2013 - 17:33:18: [SM] Displaying call stack trace for plugin "friendly.smx":
L 04/10/2013 - 17:33:18: [SM] [0] Line 76, C:\server\orangebox\tf\addons\sourcemod\scrip ting\friendly.sp::OnEntityCreated()
L 04/10/2013 - 17:33:18: [SM] Native "SDKHook" reported: Entity -2015864825 is invalid
L 04/10/2013 - 17:33:18: [SM] Displaying call stack trace for plugin "friendly.smx":
L 04/10/2013 - 17:33:18: [SM] [0] Line 76, C:\server\orangebox\tf\addons\sourcemod\scrip ting\friendly.sp::OnEntityCreated()
L 04/10/2013 - 17:33:18: [SM] Native "SDKHook" reported: Entity -2072467448 is invalid

I'll try to re write another version where that error won't appear.

thetwistedpanda 04-10-2013 11:34

Re: Friendly Mode Mod.
 
Just add a entity > 0 check in that function.

Wazman 04-10-2013 11:56

Re: Friendly Mode Mod.
 
How Do I do that again? Something like this?
Quote:

new ent = 0;

while ((ent = FindEntityByClassname(ent, "logic_auto")) != 0)
{

new ref = EntIndexToEntRef(ent);

}

DeadFuze 04-10-2013 16:40

Re: Friendly Mode Mod.
 
friendly.sp(30) : warning 217: loose indentation
friendly.sp(37) : warning 217: loose indentation
friendly.sp(68) : warning 217: loose indentation
friendly.sp(117) : warning 213: tag mismatch
friendly.sp(118) : warning 217: loose indentation
friendly.sp(126) : warning 219: local variable "weapon" shadows a variable at a preceding level
friendly.sp(136) : warning 213: tag mismatch

...

Quote:

Originally Posted by BAILOPAN
Check warning. If your plugin has a warning when compiling, it won't be approved. This includes deprecated functions.

Edit: No public Plugin:myinfo?

ddhoward 04-11-2013 03:11

Re: Friendly Mode Mod.
 
Here is the original thread.
http://forums.alliedmods.net/showthread.php?t=194840

Sreaper 04-11-2013 11:39

Re: Friendly Mode Mod.
 
Quote:

Originally Posted by ddhoward (Post 1930585)

This ^

You can credit Dyl0n as the original plugin author as he made the majority of this plugin.

MyWarthog 04-12-2013 21:07

Re: Friendly Mode Mod.
 
Only two concerns about this mod.

- Check to see if the player is dominating anyone. If they are, deny the friendly mode to allow revenge.
- Some kind of check to see if the player is in the line of sight of somebody on the same team, by their own movements rather than the other players, or the change in the other players aim. Some people like to be dicks, and if someone is sniping, they'll go rage pyro and shoot flames in front of the scope to block their view, or they'll just stand in the way. Maybe do it this way... if a player moves into the line of sight as a friendly, punish the friendly through a configurable option for a series of offenses (example, first offense, second offense, third offense and so on). Punishments could be the fun commands, could be a plugin command, a kick, a ban, a team change or friendly mode removal.

That may seem like a bit much, but I'm just addressing some of the abuses I've seen friendlies do.


All times are GMT -4. The time now is 15:54.

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