This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Stop RoundTimer?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sake
Senior Member
Join Date: Jul 2011
Old 07-27-2011 , 16:59   Stop RoundTimer?
Reply With Quote #1

Hello there,

Is it possible to make the round timer stop ticking? So that it's always for example 5:00 in the game? (Counter-Strike)

kind regards

sake
sake is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 07-27-2011 , 17:04   Re: Stop RoundTimer?
Reply With Quote #2

make a global task, and each second send usermsg
lazarev is offline
sake
Senior Member
Join Date: Jul 2011
Old 07-28-2011 , 16:24   Re: Stop RoundTimer?
Reply With Quote #3

Hmm. Maybe there is another way? Or another thing, how can I make the people spawn even if its the 4th minute in the round?
sake is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-28-2011 , 16:30   Re: Stop RoundTimer?
Reply With Quote #4

Quote:
Originally Posted by sake View Post
Or another thing, how can I make the people spawn even if its the 4th minute in the round?
How does this differ from a respawn plugin?
SnoW is offline
Send a message via MSN to SnoW
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-28-2011 , 16:47   Re: Stop RoundTimer?
Reply With Quote #5

or just do infinite round by arkshine.
Doc-Holiday is offline
sake
Senior Member
Join Date: Jul 2011
Old 07-29-2011 , 03:01   Re: Stop RoundTimer?
Reply With Quote #6

Quote:
Originally Posted by SnoW View Post
How does this differ from a respawn plugin?
In no way. I am trying to develop my own version of CS Deathmatch and everything works fine but this thing .).
sake is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-29-2011 , 03:07   Re: Stop RoundTimer?
Reply With Quote #7

You're talking about mid-round spawn after joining ? You'll have to do that manually.
You could have a look at my jctf plugin, it has respawning stuff.
__________________
Hunter-Digital is offline
sake
Senior Member
Join Date: Jul 2011
Old 07-29-2011 , 03:13   Re: Stop RoundTimer?
Reply With Quote #8

Exactly! You did rephrase it 100% correctly .

EDIT: But the code for your plugin is quite huge and I don't know which of the functions you use for respawning could help me out.

EDIT2: That's what I am doing right now:

PHP Code:
/*
* called on change of TeamInfo. Player gets hudmessage if he connects and is dead 
* that says he has to respawn manually.
*/
public teamAssigned()
{
    new 
id read_data(1);
    if(
id 32)
    {
        return;
    }
    if(
is_user_connected(id) && !is_user_hltv(id) && !is_user_bot(id))
    {
        new 
CsTeams:team cs_get_user_team(id);
        if(
team != CS_TEAM_CT && team != CS_TEAM_T)
        {
            return;
        }
        if(!
is_user_alive(id))
        {
            
set_hudmessage(25500, -1.00.3003.06.0);
            
show_hudmessage(id,"After selecting your model say /respawn to start the game!");
        }
    }

But that's not really user-friendly... I have also tried calling spawnPlayer:

PHP Code:
/*
* simple spawnPlayer method. spawns player.
*/
public spawnPlayer(id)
{
    if(
is_user_connected(id) && id <= 32)
    {
        
dllfunc(DLLFunc_Spawn,id);
    }

But it didn't work until a player has chosen his model...

Last edited by sake; 07-29-2011 at 03:40.
sake is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-29-2011 , 03:50   Re: Stop RoundTimer?
Reply With Quote #9

Use exectueham to respawn the player.

also you can check when player has selected a team can you not? i could have sworn there was a way to hook switch team. which is what happens spectator to CT/T.

Catch that and ExecuteHamB(Ham_CS_RoundRespawn, id)
Doc-Holiday is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-29-2011 , 03:58   Re: Stop RoundTimer?
Reply With Quote #10

@sake

Why would you print a message to use /respawn when you can just trigger it from the code ?

Well, I didn't tell you to look at every single code there, you'll have to search... first find the "TeamInfo" hook, then find it's function and go from there.

Also, make sure you respawn player after he chose his class, not team, "TeamInfo" is called on both.
__________________
Hunter-Digital 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:57.


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