Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 11 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Enhanced Quickmenu
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
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]
more info? write and ill try :d
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Saturday, Oct. 31, 2009 05:02 am
why you want to manually reset score if you have fast_start function?
Share |
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
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]
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
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?
Share |
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
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.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
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.
Share |
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Monday, Nov. 2, 2009 01:58 pm
woops - I forgot to write admin only after map change, gametype and restart :d

Only resetting score (option 4) and info (option 8) is available to the regular players.

And if I want the mod to write:
Are you sure you want to change map/change gametype/restart?
1. Yes
2. No

How can I make it do that without making another .menu file for each option?
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
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.
Share |
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Monday, Nov. 2, 2009 03:45 pm
Hmm .. good idea :d now just the problem with resetting score.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Nov. 2, 2009 06:16 pm
well, you need to use a ScriptMenuResponse in the menu file to inform the server to reset the score for a certain player, 'cause you can't change it clientside.

here is a tutorial which explains how to use ScriptMenuResponses:

http://wiki.modsrepository.com/index.php/Call_of_Duty_5:_Menu_Modding_Basics%23Script_response
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»