Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Weapon-Specific Spawn Protection


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 12.10.2011 19:22

Weapon-Specific Spawn Protection

By: nikhilgupta345

<b>

Description:

</b>

This plugin allows you to protect a player from a certain weapon for the first X seconds after he spawns. A .ini file is created where you can place the weapon names that you want to be blocked.


<b>

CVars:

</b>

  • wssp_protect_time - How long players are protected for after they spawn.

Installation:

  • Click 'Get Plugin' link below
  • Place 'weapon_spawn_protection.amxx' in addons/amxmodx/plugins/ folder
  • Open addons/amxmodx/configs/plugins.ini
  • Add the line 'weapon_spawn_protection.amxx' at the bottom
  • Either create 'spawn_protect_weapons.ini' on your own in the configs folder or allow the plugin to run once and it'll create it for you.
  • Add weapon names to it (weapon_awp, weapon_deagle, weapon_usp). Full list can be found here: http://wiki.amxmodx....ons_Information
  • Restart server or change map

Example:

  • Example of 'spawn_protect_weapons.ini'
  • Code: ;Use this file to configure which weapons players are protected from on spawn.
    weapon_awp
    weapon_deagle
    weapon_knife
    weapon_usp
    ;weapon_aug
  • In the above code, awp, deagle, knife, and usp will be blocked, but not aug. Using ';', or '//' at the beginning of the line will comment it out completely. If something is not working, make sure that you see the 'Weapon Loaded: WEAPON_NAME' in console when you restart the server. If it's there and it is not working, let me know.

Changelog:


  • Code: October 12, 2011
    • -v1.0-
    • Initial Release
  • -v1.0.1-
    • Turn off weapons if no plugins were registered
    • Don't read from file if file was just created
    • Change from boolean + task to gametime
October 14, 2011
  • -v1.1-
  • Optimized Ham_TakeDamage and Ham_TraceAttack function calls
  • Credits to ConnorMcLeod for these optimizations.

Credits:


Attached Files Dołączona grafika Get Plugin or Get Source (weapon_spawn_protection.sma - 4.2 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych