Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-09-22 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
September 21, 2012, 09:41:16 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Block Protection Plugin  (Read 1407 times)
Frenzzy
Full Member
***
Posts: 217


337905984 frenzzy@live.ru
View Profile WWW
« on: November 28, 2010, 11:47:10 AM »

War3Source Addon - Block Protection

This addon temprorary turns off block mode for players appeared at the same location on map at spawn.

Servers running this addon: http://www.game-monitor.com/BlockProtect


Convars:

The following convars are available to customize the plugin:

Plugin version. Don't change this.

war3_blockprotect_version "1.4"

Enabled/Disabled Block Protection functionality.

war3_blockprotect_enabled "1"

How many checks before slaying blocker.
A value of 1 is approximately equal to 1 second. Not recommended to use small values, such as 1, 2 or 3.
0 - Unlimited: Checks will be working until the end of the round.


war3_blockprotect_checking_count "0"

Distance at which a player will be checked nearby.
Info: CSS player standing height: 63, crouched height: 50.


war3_blockprotect_distance "64.0"

Start block checking before end of freeze time.
0 - No: Block check start after 3 second after round start or after mp_freezetime end.
1 - Yes: Block check start immediately after round start.


war3_blockprotect_freezetime "0"

Allow players to use !noblock command.

war3_blockprotect_alllow_command "1"

Hide !noblock command in chat.

war3_blockprotect_hide_command "0"


Natives:

I also added a native interface to enable player block protection from another races / plugins:

/**
 * Make player is not solid and start block protection.
 *
 * @param client: Client index.
 * @noreturn
 */


native War3_BlockProtect(client);


Changelist:

1.0
  • Initial release.
1.1
  • Added a native interface.
  • Added translations support (also russian translation added).
  • Changed default value for convar war3_blockprotect_checking_count (now its '0').
  • Removed 'Extended' option from convar 'war3_blockprotect_type' (not needed anymore).
  • Some plugin optimizations (for example now used convar hooks).
1.2
  • Added reading values of variables from cfgs.
  • Now when war3_blockprotect_type "0", native War3_BlockProtect will operate as Advanced.
  • Removed use War3Source_Interface. Now, this addon can work without War3Source.
  • The addon is no longer using phrases for players.
  • Natives moved to "W3SIncs/BlockProtect".
1.3
  • Fixed: for(new i=0; i<MaxClients; i++) => for(new i=1; i<=MaxClients; i++)
1.4
  • Added !noblock command.
« Last Edit: January 27, 2011, 08:47:56 AM by Frenzzy » Logged

O_o
nvn
Full Member
***
Posts: 133


View Profile
« Reply #1 on: November 28, 2010, 02:32:17 PM »

Whole code was written by you?
Logged

Frenzzy
Full Member
***
Posts: 217


337905984 frenzzy@live.ru
View Profile WWW
« Reply #2 on: November 29, 2010, 01:29:52 AM »

Whole code was written by you?
yep, have any problems?
Logged

O_o
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #3 on: November 29, 2010, 09:47:17 AM »

u probably know enough to start a catagorized shopmenu
« Last Edit: November 29, 2010, 02:54:26 PM by Ownz » Logged

DarkEnergy
Schmarotzer
Full Member
***
Posts: 189


Ich schmarotze dich!

258631507
View Profile WWW
« Reply #4 on: November 29, 2010, 10:04:12 AM »

What do you mean, Ownz?
Logged

Welcome to my server
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #5 on: November 29, 2010, 02:54:51 PM »

u probably know enough to start a catagorized shopmenu
i misspelled, now its fixed
Logged

DarkEnergy
zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #6 on: November 30, 2010, 03:32:45 PM »

u probably know enough to start a catagorized shopmenu
i misspelled, now its fixed

I may be able to help as I was planning on coding one after seeing the release notes in beta 7. (1.1.8.7)
Logged

Frenzzy
Full Member
***
Posts: 217


337905984 frenzzy@live.ru
View Profile WWW
« Reply #7 on: December 02, 2010, 08:53:53 AM »

New version!

Now you can use function War3_BlockProtect() instead of your big code.

Example (conditional code):

Quote

// ... some code ...

#include "W3SIncs/BlockProtect" // Added

// ... some code ...

public OnUltimateCommand(client, race, bool:pressed)
{
    // ... some checks, target search, ect ...

    new Float:fPos[3];
    new Float:fAng[3];

    GetClientAbsOrigin(client, fPos);
    GetClientEyeAngles(client, fAng);

    TeleportEntity(target, fPos, fAng, NULL_VECTOR);

    SetEntData(target, g_iOffsetCollisionGroup, 2, 4, true);
    SetEntData(client, g_iOffsetCollisionGroup, 2, 4, true);
    CreateTimer(3.0, YourTimer, target);
    CreateTimer(3.0, YourTimer, client);

    War3_BlockProtect(target); // Added
    War3_BlockProtect(client); // Added
}

public Action:YourTimer(Handle:timer, any:client){ /* ... big code ... */ }

// ... some code ...


Players in your race are easily diverge after teleport. And you don't worry about when turned on/off players collision.
« Last Edit: January 03, 2011, 07:43:00 PM by Frenzzy » Logged

O_o
Schmarotzer
Full Member
***
Posts: 189


Ich schmarotze dich!

258631507
View Profile WWW
« Reply #8 on: January 27, 2011, 09:31:43 AM »

Excellent
Logged

Welcome to my server
[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #9 on: January 27, 2011, 09:43:01 AM »

Is this different than the anti stuck addon if so how?
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!