| Author |
Topic: Enhanced Quickmenu |
|
|
Category: CoD2 Scripting Posted: Friday, Oct. 30, 2009 08:07 pm |
 |
Hiya!
I've been making an enhanced quickmenu (for easy rcon commands, etc)
Now I just need some help with a few stuff.
1. Whats the code for resetting your score. I tried searching but what I found was Code: self.score = 0;
self.pers["score"] = 0;
self.deaths = 0;
self.pers["deaths"] = 0;
I don't know how to use this code in my mod so could someone explain it ? :D So far I made the entire mod in .menu files.
If anyone need the source files, write and i'll upload.
2. I would like to make the quickmenu write "are you sure you want to ......." (fx fast_restart) "1. yes 2. no"
Would I have to make a new .menu for every option i have? (which is quite many) or is there a way to make it a lot easier?
3. What rcon commands should I have? So far I have 9 maps, all gametypes and restart (fast and normal).
Thanks in advance! ![[thumbs_up]](images/BBCode/smilies/thumbs_up.gif)
more info? write and ill try :d |
 |
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
|
|
|
Category: CoD2 Scripting Posted: Saturday, Oct. 31, 2009 03:13 pm |
 |
To reset the players individual score, not the teams and all other peoples scores. It is like /reconnect, although you don't need to reconnect.
The only other page i found on modsonline regarding this was this one: http://www.modsonline.com/Forums-top-98463.html
That's also where I found the code ![[ohwell]](images/BBCode/smilies/ohwell.gif) |
 |
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Monday, Nov. 2, 2009 01:56 am |
 |
2. you want to give each player the ability to reset his own score etc.? or you want it for admins only?
what did you do by now for your enhanced quickmenu?
Quote: Would I have to make a new .menu for every option i have? (which is quite many)
what options would that be? |
 |
|
|
|
|
Category: CoD2 Scripting Posted: Monday, Nov. 2, 2009 07:20 am |
 |
Sevenz writes...Quote: 2. you want to give each player the ability to reset his own score etc.? or you want it for admins only?
Each player should be able to do it. Then he/she doesn't have to reconnect in case you have a bad score:d
So far I have the options for 10 maps, 5 gametypes and 2 restarts - so it would be 17 extra .menu files (and then the reset score-option which isn't included so when it is done > 18 extra files.)
I made 4 extra .menu files (map, gametype, restart, info).
Then I modified wm_quickmessage.menu - so the 4 extra menus can be accessed.
It looks like this ingame:
1. Commands
2. Statements
3. Responses
- Extra Options -
4. Reset Score
5. Change map
6. Change type
7. Restart
8. Info
If you want, I can upload it so you can see it working ingame. |
 |
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Monday, Nov. 2, 2009 10:47 am |
 |
ok so reset score for every player, but i can't imagine you want to give all players the power to change the map and gametype instantly. furthermore, why don't you use the stock map voting system? or are those options for admins only?
Quote: So far I have the options for 10 maps, 5 gametypes and 2 restarts
no need to do 17 menu files, you'll be fine with 3. |
 |
|
|
|
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Monday, Nov. 2, 2009 02:51 pm |
 |
Are you sure? Yes/No --> have a look at the stock scripts, e.g. the exit game dialog
Quote: How can I make it do that without making another .menu file for each option?
a menu file is not limited to one itemdef / menudef block. look at the stock scripts to see how they do it. |
 |
|
|
|
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|