AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   3 things: restart round, block NVG, and status bars (https://forums.alliedmods.net/showthread.php?t=55489)

Rolnaaba 05-22-2007 21:20

3 things: restart round, block NVG, and status bars
 
I need help with three things real fast if you dont mind :D

1) How can I force the server to restart the round?
2) How can I block people from buying a pair of Night Vision Goggles? And if I cant block them from buying it, can I detect when they buy it, and remove it? I was was at plugin_init calling a continuesly looping function what will check each player every 10 seconds or so for nvg and removing it if they had them, but was hopping for something more efficient.
3) Can someone show me how to make, and modify/manipulate a status bar, like what comes up when you defuse the bomb? I think I remember seeing it was a message (message_begin...) but cant remember.

All help is appreciated
HEY v3x!

teame06 05-22-2007 22:41

Re: 3 things: restart round, block NVG, and status bars
 
1.
Code:
new mp_restartround = get_cvar_pointer("mp_restartround"); //... set_pcvar_num(mp_restartround, 1);

2. Let them waste their money. I think you can block the nvg from enabling.

I think it will work.
Code:
register_clcmd("nightvision", "_NightVision"); //... public _NightVision(client) {     return PLUGIN_HANDLED; }

3.

Code:
ShowBarTime(client, time) {     message_begin(MSG_ONE, get_user_msgid("BarTime"), _, client);     write_short(time);     message_end(); }

Rolnaaba 05-23-2007 11:23

Re: 3 things: restart round, block NVG, and status bars
 
wow incredible simple, thanks.
would
Code:
new mp_restartround;
be declared globally then assigned:
Code:
mp_restartround = get_cvar_pointer("mp_restartround");
in plugin_init or can i do this anywhere?

Rolnaaba 05-23-2007 11:28

Re: 3 things: restart round, block NVG, and status bars
 
also, how would I be able to stop that bar before it fills and restart it?
like say on the Death event, restart the killers bar to the begining.

regalis 05-23-2007 11:55

Re: 3 things: restart round, block NVG, and status bars
 
Quote:

Originally Posted by Rolnaaba (Post 479731)
wow incredible simple, thanks.
would Code:
new mp_restartround;

be declared globally then assigned:
Code:
mp_restartround = get_cvar_pointer("mp_restartround");

in plugin_init or can i do this anywhere?

plugin init seems suitable ;)

teame06 05-23-2007 13:29

Re: 3 things: restart round, block NVG, and status bars
 
Quote:

Originally Posted by Rolnaaba (Post 479734)
also, how would I be able to stop that bar before it fills and restart it?
like say on the Death event, restart the killers bar to the begining.

I think you would have to send another BarTime message with time being 0.

Rolnaaba 05-23-2007 13:42

Re: 3 things: restart round, block NVG, and status bars
 
so send it with time being 0 that will fill it all the way up then i can start a new one...with time whatever I want. but will the mesage overwrite old one or compound a new one?


All times are GMT -4. The time now is 10:39.

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