Spawn protection

Šiame forume vartotojai gali prašyti jiems reikiamo plugino.
Forum rules
Šiame forume galite siūlyti idėjas ar prašyti jums reikalingų pluginų. Jei kas nors pradės jį kurti, tai pasirašys Jūsų sukurtoje temoje. Niekada nepykite, jei niekas neatsako į Jūsų prašymą. Gal tai tiesiog per sudėtinga, arba reikalauja per daug darbo.
Post Reply
User avatar
acTesT
Jau po truputį tampa savu
Posts: 113
Joined: 2010 Sep 18 20:51
Skype: Andriukas123461

Spawn protection

Post by acTesT »

Sveiki, gal kas turit pluginą normalų optimatizuoto kodo Spawn protection'ą? :)

User avatar
NZT
Flooderis arba specialistas
Posts: 836
Joined: 2011 Aug 18 17:44

Re: Spawn protection

Post by NZT »

Sveikas, štai prašom:

Code: Select all

#include <amxmodx>#include <hamsandwich>#include <fun> #define PLUGIN "Spawn Protection"#define VERSION "1.2"#define AUTHOR "Safety1st" #define GLOW_THICK 10   // set glow shell thickness here from 1 to 100; comment to disable glow new pSPtime public plugin_init() {    register_plugin( PLUGIN, VERSION, AUTHOR )     pSPtime = register_cvar( "sp_time", "3" )   // cvar for controlling protection time     RegisterHam( Ham_Spawn, "player", "FwdSpawnPost", .Post = 1 )} #if defined GLOW_THICKnew giSPthick public plugin_cfg() {    giSPthick = clamp( GLOW_THICK, 1, 100 )}#endif public FwdSpawnPost(id) {    // check is needed because HamSpawn is called for spectators too    if ( !is_user_alive(id) )        return     // enable protection    set_user_godmode( id, .godmode = 1 ) #if defined GLOW_THICK    if ( giSPthick ) {        switch ( get_user_team(id) ) {            case 0  : {                // game without teams, random color                set_user_rendering( id, kRenderFxGlowShell, random(255), random(255), random(255), kRenderNormal, giSPthick )            }            case 1  : set_user_rendering( id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, giSPthick /* red */ )            default : set_user_rendering( id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, giSPthick /* blue */ )        }    }#endif     set_task( get_pcvar_float( pSPtime ), "DisableProtection", id )} public DisableProtection(id) {    if ( !is_user_connected(id) )        return     set_user_godmode(id)    // disable godmode #if defined GLOW_THICK    if ( giSPthick )        set_user_rendering( id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0 )#endif}

User avatar
acTesT
Jau po truputį tampa savu
Posts: 113
Joined: 2010 Sep 18 20:51
Skype: Andriukas123461

Re: Spawn protection

Post by acTesT »

Ačiū, pasiredaguosiu biški :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests