Raised This Month: $ Target: $400
 0% 

pause / bind pause


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BIGR
Junior Member
Join Date: Aug 2008
Old 01-05-2011 , 18:47   pause / bind pause
Reply With Quote #1

Hi,
i need help with pause.

I check admincmd.sma where is a good function of pause, but it's for new cmd.
I create function for pause with some conditons, but i need optimise.
I would send cmd pause, and now run my fuction with some conditons (minimum connection time, ...).



cmd pause and run fuction OR check bind and set bind pause

1) cmd pause block
Code:
public plugin_init()
{
register_clcmd("pause","func_test")
register_clcmd("func_pause","func_test")
}

public func_test(id) 
{
client_print(id,print_chat,"It is great !")
return PLUGIN_CONTINUE
//but if I send cmd pause, this function not run
}
2) When it will not do. I need check client bind pause.
I test it with function query_client_cvar().
Every my test: Bad CVAR request



3) else if you are dont help me, i must hard send for client this and use func_pause
Code:
public client_putinserver(id)
{
set_task(15.0, "set_pause", id)
}

public set_pause(id)
{
client_cmd(id, "bind ^"pause^" ^"func_pause; pause^"")
}
But it's not good, becouse somebody don't have bind "pause" "pause".




sorry my english is bad

Thanks, BIGR.

Last edited by BIGR; 01-06-2011 at 02:06.
BIGR is offline
BIGR
Junior Member
Join Date: Aug 2008
Old 01-07-2011 , 14:44   Re: pause / bind pause
Reply With Quote #2

refresh, please some answer
BIGR is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 01-07-2011 , 16:14   Re: pause / bind pause
Reply With Quote #3

1. I don't see anything wrong with that code, only the return is not needed.
2. It's not possible to get a client's binds.
3. That's slowhacking and is not allowed here.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
BIGR
Junior Member
Join Date: Aug 2008
Old 01-08-2011 , 02:53   Re: pause / bind pause
Reply With Quote #4

drekes:
1) allow cmd pause after 60s, but as? its ok for cmd func_pause
Code:
new time = 0

public func_test(id)
{
time=get_user_time(id)

if (time < 60) 
{
client_print(id, print_chat, "before 60s - func pause test")
return PLUGIN_HANDLED; 
}
else
{
client_print(id, print_chat, "after 60s - func pause test")
client_cmd(id, "pause")
}
return PLUGIN_CONTINUE
}
2,3) Thanks for answer.

Last edited by BIGR; 01-08-2011 at 03:04.
BIGR is offline
BIGR
Junior Member
Join Date: Aug 2008
Old 01-08-2011 , 19:29   Re: pause / bind pause
Reply With Quote #5

refresh, please some answer about 1)
BIGR is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 01-08-2011 , 21:54   Re: pause / bind pause
Reply With Quote #6

What exactly do you want the plugin to do ?
It's a bit unclear to me. What does the pause command do ?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
BIGR
Junior Member
Join Date: Aug 2008
Old 01-08-2011 , 23:08   Re: pause / bind pause
Reply With Quote #7

cmd pause, if you server cvars pausable is 1, it's paused the game. I dont know, what I must write about standart fuction pause.
BIGR is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 01-09-2011 , 00:48   Re: pause / bind pause
Reply With Quote #8

I tried this, and my console said i paused the game, but it doesn't seem to do anything.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
BIGR
Junior Member
Join Date: Aug 2008
Old 01-09-2011 , 10:48   Re: pause / bind pause
Reply With Quote #9

I need some dev.
Becouse I dont know, How I can edit client cmd pause.

You can run fuction on any other commands (usp, buy, ...) but pause ?
BIGR is offline
Reply


Thread Tools
Display Modes

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 02:12.


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