Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » !tdonate  () 2 Votes
Re: !tdonate [message #340070 is a reply to message #340038] Thu, 10 July 2008 02:10 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Creed3020 wrote on Wed, 09 July 2008 22:10

This is one fo the first releases I have seen in a while that I would actually like to implement but I haven't a clue how ti implement that code.

Could someone kindly point me in the correct direction to get started, after that I will give it a go. Thanks!



You'll need visualstudio.net2005, there is a thread on setting it up here: http://www.renegadeforums.com/index.php?t=msg&th=26642&start=0&rid=3 415

You will also need the source code to SSGM 2.02, which you can get here: http://black-cell.net/downloads/index.php?act=view&id=30

You'll need to open the .sln file in the source code folder of SSGM (once it's un-zipped), this will open up all the .cpp and .h files in one go, you'll be able to see them all in the left hand side solution explorer window.
Open up gmmain.cpp by navigating to it in the solution explorer window like this:
http://www.game-maps.net/staff/reborn/help1.gif
And then double click it. That will then open it up in your main window then...
Scroll down in this window until you see this come up:

//******************************************************************************
//********************************* CHAT COMMANDS ******************************
//******************************************************************************


That's where you then copy and paste in the chat command for tdonate.
Unfortunately the chat command relies on the team player count function, which I found was bugged out. So you'll now need to open the file in your solution explorer called engine_player.cpp, this file is in the folder in your solution explorer called scripts source files. Scroll down until you see this "int Get_Team_Player_Count(int Team)", and then replace it with the one I posted above.
You need to save both these files now, you can do this with "control S" when you're in the main page for each .cpp file, but it's probably better for you to go to "file" in the top left hand corner, and then hitting "Save All".
Now you need to compile this solution, just go up to "Build" on the tool bar and then "build solution", or you could hit your f7 button (there's like a million ways to do everything in visualstudio).
This might take a little while depending on your computer speed, and it always takes a while the first time anyway. Assuming you've done it right and there are no errors, it will produce a scripts.dll file in your source code folder. This is then the file you should use to replace the existing one on your server.
Any problems then post back Smile



Re: !tdonate [message #340118 is a reply to message #340070] Thu, 10 July 2008 09:39 Go to previous messageGo to next message
HeavyX101- Left is currently offline  HeavyX101- Left
Messages: 633
Registered: April 2008
Location: WindowsJail=ZipFolder
Karma: 0
Colonel
I think moderators should split the last post reborn and make it a topic that is a sticky. So, next time when people ask, they will see that topic and read and learn.
Good tutorial reborn Smile


This account is no longer being active.
Re: !tdonate [message #340534 is a reply to message #339723] Sat, 12 July 2008 18:20 Go to previous messageGo to next message
ExEric3 is currently offline  ExEric3
Messages: 746
Registered: February 2005
Location: Slovakia
Karma: 0
Colonel
I cannot compile it. There are errors:

1 error C2220: warning treated as error - no 'object' file generated 1369
2 warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data 1369
3 warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data 1375
4 warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data 1382


index.php?t=getfile&id=7057&private=0

Can someone help?
Re: !tdonate [message #340535 is a reply to message #340534] Sat, 12 July 2008 18:27 Go to previous messageGo to next message
HeavyX101- Left is currently offline  HeavyX101- Left
Messages: 633
Registered: April 2008
Location: WindowsJail=ZipFolder
Karma: 0
Colonel
I get the same error. Lol. reborn will help you, and that will help me Rocked Over

This account is no longer being active.
Re: !tdonate [message #340823 is a reply to message #339723] Mon, 14 July 2008 10:48 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Your compiler is moaning because I didn't use a cast to convert the different types. You need to either use a cast or disable those warnings.


Re: !tdonate [message #340916 is a reply to message #340823] Mon, 14 July 2008 22:17 Go to previous messageGo to next message
ExEric3 is currently offline  ExEric3
Messages: 746
Registered: February 2005
Location: Slovakia
Karma: 0
Colonel
reborn wrote on Mon, 14 July 2008 19:48

Your compiler is moaning because I didn't use a cast to convert the different types. You need to either use a cast or disable those warnings.


And how disable it?
Re: !tdonate [message #340923 is a reply to message #339723] Mon, 14 July 2008 23:06 Go to previous messageGo to next message
raven
Messages: 595
Registered: January 2007
Location: Toronto, Ontario
Karma: 0
Colonel
#pragma warning ( disable : 4244 )

-Jelly Administrator
-Exodus Administrator
Re: !tdonate [message #340926 is a reply to message #340923] Mon, 14 July 2008 23:30 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
raven wrote on Mon, 14 July 2008 23:06

#pragma warning ( disable : 4244 )

even if u disable them will it still work or have risk of crashing and causing errors?
Re: !tdonate [message #340929 is a reply to message #339723] Mon, 14 July 2008 23:47 Go to previous messageGo to next message
raven
Messages: 595
Registered: January 2007
Location: Toronto, Ontario
Karma: 0
Colonel
It'll work fine.

-Jelly Administrator
-Exodus Administrator
Re: !tdonate [message #341754 is a reply to message #340929] Sat, 19 July 2008 05:19 Go to previous messageGo to next message
ExEric3 is currently offline  ExEric3
Messages: 746
Registered: February 2005
Location: Slovakia
Karma: 0
Colonel
raven wrote on Tue, 15 July 2008 08:47

It'll work fine.


Are you sure? Because it crashing FDS when I type !tdonate xxx

Re: !tdonate [message #341801 is a reply to message #339723] Sat, 19 July 2008 10:02 Go to previous message
raven
Messages: 595
Registered: January 2007
Location: Toronto, Ontario
Karma: 0
Colonel
The script isn't ment to handle text input

-Jelly Administrator
-Exodus Administrator
Previous Topic: Looking for Bot maps
Next Topic: Bot Waypaths
Goto Forum:
  


Current Time: Tue Dec 24 13:12:27 MST 2024

Total time taken to generate the page: 0.00816 seconds