
Spawn protection
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.
Š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.
Spawn protection
Sveiki, gal kas turit pluginą normalų optimatizuoto kodo Spawn protection'ą? 

Re: Spawn protection
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}
Re: Spawn protection
Ačiū, pasiredaguosiu biški 

Who is online
Users browsing this forum: No registered users and 1 guest