Spawn Protection

MIT

A simple SourceMod Spawn Protection plugin that was developed for Counter-Strike: Source and Counter-Strike: Global Offensive.

A simple SourceMod Spawn Protection plugin that was developed for Counter-Strike: Source and Counter-Strike: Global Offensive, but should work in other games as well. What's neat about this plugin is it uses SDKHooks to block damage and includes an option to stop spawn protection when the victim fires their weapon.

ConVars

  • sm_sp_announce - When enabled, the attacker will receive chat messages (if enabled per client) that the victim is protected (Default 1).
  • sm_sp_time - The amount of time to protect each player on spawn (Default 5.0).
  • sm_sp_on_fire - When enabled, if the victim fires their weapon before the spawn protection time runs out, it will remove their protection (Default 1).
  • sm_sp_exclude_afk - If 1, users who are AFK will not be spawn protected.

Commands

  • sm_rspnotify - This toggles protected notifications per attacker/client via client cookies.

Natives

For developers, the following natives are supported.

/**
 * Checks whether the client is protected or not.
 * 
 * @param iClient Client's index.
 * 
 * @return boolean
 */
native bool IsSpawnProtected(int iClient);

/**
 * Notifies the attacker that the victim is AFK.
 * 
 * @param iAttacker The attacker's client index.
 * @param iVictim The victim's client index.
 * 
 * @return boolean Returns true on success and false otherwise.
 */
native bool NotifyAttacker(int iAttacker, int iVictim);

You may include the plugin with the following assuming scripting/include/RSP.inc exists.

#include <RSP>

安装说明

You'll want to compile the source code (`scripting/SpawnProtection.sp`). Afterwards, copy/move the compiled SpawnProtection.smx file into the server's addons/sourcemod/plugins directory.

互动趋势

加载中…

Spawn Protection 是一个 Counter-Strike: Source 模组。它拥有 1 次下载、7 次浏览、0 次收藏和 1 个发布版本。 此条目属于 4 个标签。

评价

登录后即可发表评价。

加载中…

评论 (0)

登录后即可评论。

加载中…
Spawn Protection - Counter-Strike: Source - The Modding Community