User
Pass
2FA
 
 

[rezolvat]Cerere

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message942
vanPersie

[火]



Status: Offline
(since 01-12-2024 17:31)
Joined: 14 Sep 2014
Posts: 304, Topics: 43
Location: Old Trafford

Reputation: 153.3
Votes: 16

 
Post Posted: 23-11-2014, 22:57:31 | Translate post to: ... (Click for more languages)

as vrea un plugin care in prima runda sa-ti dea respawn timp de 20 de secunde. nu conteaza de cate ori mori, sa fie respawn de 20 de secunde.



0 0
  
Back to top
View user's profile Send private message
Voltage
[Banned user]


Banned


Status: Offline
(since 30-11-2014 10:27)
Joined: 05 Nov 2014
Posts: 67, Topics: 12
Location: HERO.FREAKZ.RO

Reputation: -83.1
Votes: 8

    mr_v0ltage 
Post Posted: 23-11-2014, 23:08:30 | Translate post to: ... (Click for more languages)

Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new g_counter 


new Float:RoundStartTime

new g_Time_Interval;
const MAX_PLAYERS = 32;

new g_iRespawn[MAX_PLAYERS+1], g_TeamInfoCounter[MAX_PLAYERS+1], CsTeams:g_iPlayerTeam[MAX_PLAYERS+1];
new g_pCvarRespawnTime, g_pCvarRespawnDelay, g_pCvarMaxHealth;

public plugin_init()
{
   register_plugin("Dr.Respawn", "1.1", "Vicious Vixen");
   RegisterHam(Ham_Killed, "player", "fwdPlayerKilledPost", 1);
   RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawnPost", 1);
   register_event("TeamInfo", "eTeamInfo", "a");
   register_logevent( "LogEventRoundStart", 2, "1=Round_Start" )
   g_pCvarRespawnTime = register_cvar("amx_respawn_tickets", "0"); //Set to 0 for unlimited respawns
   g_pCvarRespawnDelay = register_cvar("amx_respawn_delay", "1"); // Delay to respawn
   g_pCvarMaxHealth = register_cvar("amx_max_health", "100"); // Health on respawn
   g_Time_Interval = register_cvar("amx_max_time", "60"); // Time Left to respawn
   set_msg_block( get_user_msgid( "ClCorpse" ), BLOCK_SET );
   register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
   
   
}

public event_new_round()
{
   set_task ( 60.0, "end_bai_coi", 0 ) ;
   player_color( 0, ".v[ON].eRespawN FUN", g_Time_Interval)
}
public end_bai_coi()
{
    player_color( 0, ".v[OFF].eRespawN .vTerminat.e!")
   
}
public LogEventRoundStart()
{
   RoundStartTime = get_gametime()
   
   new iPlayers[32]
   new iNum
   
   get_players( iPlayers, iNum )
   
   for( new i = 0; i < iNum; i++ )
   {
      g_iRespawn[iPlayers[i]] = true
   }
}

public Runda_Terminata()
{
   if(RoundStartTime)
   {
   
   }
}

public fwdPlayerKilledPost(iVictim, iKiller, iShoudlGib)
{
   if(g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0)
   {
      set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer", iVictim);
   }
   return HAM_IGNORED;
}

public fwdPlayerSpawnPost(iClient)
{
   if(is_user_alive(iClient))
   {
      set_pev(iClient, pev_health, get_pcvar_float(g_pCvarMaxHealth));
   }
}

public taskRespawnPlayer(id)
{
   if(is_user_connected(id) && RoundStartTime + get_pcvar_num(g_Time_Interval) >= get_gametime() && g_iRespawn[id] && !is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
      ExecuteHamB(Ham_CS_RoundRespawn, id)
      g_iRespawn[id] = false
      return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;


public eTeamInfo()
{
   new iClient = read_data(1);
   new szTeam[2];
   read_data(2, szTeam, charsmax(szTeam));
   switch(szTeam[0])
   {
      case 'T':
      {
         if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
         {
            set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
         }
         g_iPlayerTeam[iClient] = CS_TEAM_T;
      }
      case 'C':
      {
         if(g_TeamInfoCounter[iClient] == 2 || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
         {
            set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
         }
         g_iPlayerTeam[iClient] = CS_TEAM_CT;
      }
      case 'S':
      {
         remove_task(iClient);
         g_iPlayerTeam[iClient] = CS_TEAM_SPECTATOR;
      }
   }
}

stock player_color( const id, const input[ ], any:... )
{
   new count = 1, players[ 32 ]

   static msg[ 191 ]
   vformat( msg, 190, input, 3 )
   
   replace_all( msg, 190, ".v", "^4" ) /* verde */
   replace_all( msg, 190, ".g", "^1" ) /* galben */
   replace_all( msg, 190, ".e", "^3" ) /* ct=albastru | t=rosu */
   replace_all( msg, 190, ".x", "^0" ) /* normal-echipa */
   
   if( id ) players[ 0 ] = id; else get_players( players, count, "ch" )
   {
      for( new i = 0; i < count; i++ )
      {
         if( is_user_connected( players[ i ] ) )
         {
            message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
            write_byte( players[ i ] );
            write_string( msg );
            message_end( );
         }
      }
   }
}


Incearca

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
lemonEZAH

[Licensed to kill]



Status: Offline
(since 04-11-2019 15:30)
Joined: 28 Dec 2013
Posts: 7058, Topics: 351
Location: England

Reputation: 99.3
Votes: 483

Post Posted: 25-11-2014, 11:08:06 | Translate post to: ... (Click for more languages)

Quote:
#include <amxmodx>
#include <hamsandwich>

static const
PLUGIN[] = "Respawn in blana",
VERSION[] = "1.0",
AUTHOR[] = "www.Freakz.ro";

new count = 0
new g_msgsync

#define COUNT_TIME 20

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)

g_msgsync = CreateHudSyncObj( )

register_logevent("round_start",2,"1=Round_Start")

register_event("TextMsg","game_restart","a","2=#Game_will_restart_in")

RegisterHam(Ham_Killed,"player","fwd_kill")
}
public game_restart() count = 0
public round_start( ) {
count = COUNT_TIME

if(task_exists(123456))
remove_task(123456)
else
set_task(1.0,"tasktime",123456,_,_,"b")
}

public tasktime() {

if(count > 0)
{
count--
set_hudmessage(56, 148, 198, 0.21, 0.12, 0, 6.0, 1.0)
ShowSyncHudMsg(0,g_msgsync,"Mai sunt %d secund%s de respawn",count,count == 1 ? "a" : "e")
}
}
public fwd_kill(id)
if(count > 0) set_task(1.0,"spawn_kill",id)

public spawn_kill(id) ExecuteHam(Ham_CS_RoundRespawn,id)

0 0
  
Back to top
View user's profile Send private message
Her0brineXD

[Mentally Stable]



Status: Offline
(since 25-12-2014 15:01)
Joined: 26 Nov 2014
Posts: 51, Topics: 1
Location: Romania

Reputation: 62.7
Votes: 2

Post Posted: 28-11-2014, 10:32:26 | Translate post to: ... (Click for more languages)

Spuer !! Multumesc - Chiar aveam nevoie
0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by EDUTz, 28 November 2014 12:49



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 02-03-2025, 00:30:54
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x