Raised This Month: $32 Target: $400
 8% 

Deathrun respawn v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
emaya93
Member
Join Date: Jun 2012
Old 09-03-2012 , 12:57   Deathrun respawn v1.1
Reply With Quote #1

Autor: Vicious Vixen
Version: 1.1

Thanks to:
- fysiks -> For give me a good advice.
- kp3t3h -> For give me a part of script.

Description:
- This plugin allows you to set time for respawn in a round.
- Hud message with "Remaing x seconds to respwan" and "Respawn is off"
- Is very good, special for deathrun.

CVAR:
amx_respawn_tickets -> set up how many times can respawn a player | Defaul 0 (unlimited spawn)
amx_respawn_delay -> delay until respawn | (default 1)
amx_max_health -> health on respawn | (default 100)
amx_max_time -> time until a player can respawn (time in seconds) | (default 30)

Image:
[IMG]http://img26.**************/img26/6285/2012090300002.jpg[/IMG]
[IMG]http://img404.**************/img404/1162/2012090300001z.jpg[/IMG]

Update:
1.2
- remove respawn for tero team
Attached Files
File Type: sma Get Plugin or Get Source (respawn.dr.sma - 5069 views - 3.6 KB)

Last edited by emaya93; 09-22-2012 at 09:45.
emaya93 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-07-2012 , 12:03   Re: Deathrun respawn v1.1
Reply With Quote #2

Why do you increment a boolean value? And not declare it as a boolean?
Code:
    for( new i = 0; i < iNum; i++ )     {         g_iRespawn[iPlayers[i]] = true     }
    if(g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0)
        g_iRespawn[id] = false

I would also not have an event for when someone changes teams. I'd just grab their pdata before spawn and avoid if its spec. This will also get rid of g_iPlayerTeam, which is not really needed anyway. What is g_TeamInfoCounter? It doesn't count anything... But if you really want it to reset spawn time on team change use this....
PHP Code:
public eTeamInfo()
{
    new 
id read_data(1)
    new 
szTeam[3]
    
read_data(2szTeamcharsmax(szTeam) )
    
    if(
task_exists(id) )
        
remove_task(id)
        
    if(
szTeam[0] != 'S')
        
set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient)

Gets rid of 2 arrays (saving memory)
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
emaya93
Member
Join Date: Jun 2012
Old 09-09-2012 , 11:22   Re: Deathrun respawn v1.1
Reply With Quote #3

still dosen't work, he dont remove that task..
emaya93 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-10-2012 , 08:39   Re: Deathrun respawn v1.1
Reply With Quote #4

I wasn't fixing your code. I was giving you improvements and wondering why you did something. This code should, honestly, be re-written. Its pretty bad.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
emaya93
Member
Join Date: Jun 2012
Old 09-10-2012 , 12:56   Re: Deathrun respawn v1.1
Reply With Quote #5

i din't say that i know to write corectly a cod... if some one, can make that code from zero. will be the oficial autor... I'm not so god in scripting i just trying to understand ...
emaya93 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-10-2012 , 13:59   Re: Deathrun respawn v1.1
Reply With Quote #6

So are you saying that you cannot support and improve this plugin with your current knowledge without major assistance from others?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
emaya93
Member
Join Date: Jun 2012
Old 09-11-2012 , 04:41   Re: Deathrun respawn v1.1
Reply With Quote #7

something like that. Look, I'm sorry that I don't know how to write a cod correctly.. I just trying to help other guys ho want a plugin like this...
emaya93 is offline
PandaDnB
Senior Member
Join Date: Jan 2012
Old 09-14-2012 , 11:55   Re: Deathrun respawn v1.1
Reply With Quote #8

Does it respawn late jointers?
PandaDnB is offline
pewex
Senior Member
Join Date: Dec 2010
Location: AlliedMods
Old 09-15-2012 , 08:11   Re: Deathrun respawn v1.1
Reply With Quote #9

If we have 1 life , plugin - respawn several times players. Please FIX

vip on the server has 65 hp, 35 hp normal player .... - Plugin gives all 100hp - PLEASE FIX
pewex is offline
PandaDnB
Senior Member
Join Date: Jan 2012
Old 09-15-2012 , 15:17   Re: Deathrun respawn v1.1
Reply With Quote #10

Try this:
Attached Files
File Type: sma Get Plugin or Get Source (respawn.dr.sma - 1544 views - 3.6 KB)
PandaDnB is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode