Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » donateC++
donateC++ [message #293430] Sun, 28 October 2007 23:38 Go to next message
MafiaKasya is currently offline  MafiaKasya
Messages: 19
Registered: October 2007
Karma: 0
Recruit
How Can i Make Donate Command:

!donate <player> <amount>

What to write in Code

PLEASE HELP(C++)
Re: donateC++ [message #293483 is a reply to message #293430] Mon, 29 October 2007 07:13 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
Post the code you already have then maybe we can help.
Re: donateC++ [message #293490 is a reply to message #293430] Mon, 29 October 2007 07:53 Go to previous messageGo to next message
Goztow is currently offline  Goztow
Messages: 9738
Registered: March 2005
Location: Belgium
Karma: 13
General (5 Stars)
Goztoe
You do realise that most bots already have this command, right?

You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord
Re: donateC++ [message #293510 is a reply to message #293430] Mon, 29 October 2007 10:19 Go to previous messageGo to next message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma: 0
General (3 Stars)
Permabanned for trying and failing DDoS
i think hes creating his own bot
Re: donateC++ [message #293583 is a reply to message #293510] Mon, 29 October 2007 14:44 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
MadRockz wrote on Mon, 29 October 2007 12:19

i think hes creating his own bot

Or he wants to learn how to do it himself.


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: donateC++ [message #293588 is a reply to message #293510] Mon, 29 October 2007 14:59 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
MadRockz wrote on Mon, 29 October 2007 11:19

i think hes creating his own bot



If this is true, I would first start out by learning the fundamentals of C++ and Scripts.dll (SSGM version). You need to learn how the Renegade Engine does stuff, as far as what you can do and what you can't do.

Since you're asking for help on making a !donate command, I would look at the Example Plugin's source you get when you download SSGM. It has a sample command ( "!test" ) built-in for you. You can modify that and make your donate command.


~MathK1LL

P.S.

This is the longest "help" post I've made! Razz
Re: donateC++ [message #293669 is a reply to message #293430] Tue, 30 October 2007 01:19 Go to previous messageGo to next message
MafiaKasya is currently offline  MafiaKasya
Messages: 19
Registered: October 2007
Karma: 0
Recruit
problem is i don't know how to write This:

How to use money and player like:

~ !donate Kasya 1000

How to use Kasya and 1000 in there?
Re: donateC++ [message #293696 is a reply to message #293430] Tue, 30 October 2007 05:26 Go to previous messageGo to next message
Cat998
Messages: 1081
Registered: January 2004
Location: Austria, Vienna
Karma: 0
General (1 Star)
Moderator/Captain

That's like trying to fly an Airbus A320 without a pilot license.
You either learn it or not, but don't ask what switches you have to switch.



  • learn C++ (calling functions, using variables, classes, char string parsing)
  • read a C++ book
  • read some more C++ books
  • read bhs.txt and console.txt
  • Have a look at how SSGM does stuff and have a look at its example plugin.
  • come back here



When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"

Programming is like sex: one mistake and you have to support it for the rest of your life

Want the best answers? Ask the best questions!

"So long, and thanks for all the fish."

[Updated on: Tue, 30 October 2007 05:26]

Report message to a moderator

Re: donateC++ [message #293725 is a reply to message #293430] Tue, 30 October 2007 07:35 Go to previous messageGo to next message
Sir Kane
Messages: 1701
Registered: March 2003
Location: Angerville
Karma: 0
General (1 Star)
Only hobos read books.

Proud N9500 and proud N6270 user. Creator of the IEE libraries (original bhs.dll) and the RB series software.
http://n00bstories.com/image.fetch.php?id=1189992501http://www.n00bstories.com/image.fetch.php?id=1257492907
Re: donateC++ [message #293736 is a reply to message #293725] Tue, 30 October 2007 08:38 Go to previous messageGo to next message
The Elite Officer is currently offline  The Elite Officer
Messages: 602
Registered: September 2007
Location: Chapel Hill, North Caroli...
Karma: 0
Colonel
Sir Kane wrote on Tue, 30 October 2007 10:35

Only hobos read books.


Exactly, only modern people read online articles, news clips, and PDF's.


The reason Uranus is tilted 90 degrees is because god got angry and kicked it over.....
Re: donateC++ [message #293772 is a reply to message #293736] Tue, 30 October 2007 13:42 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
The Elite Officer wrote on Tue, 30 October 2007 15:38

Sir Kane wrote on Tue, 30 October 2007 10:35

Only hobos read books.


Exactly, only modern people read online articles, news clips, and PDF's.


what about a modern hobo?
Re: donateC++ [message #293786 is a reply to message #293430] Tue, 30 October 2007 14:37 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

eBooks. Wink

BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: donateC++ [message #293788 is a reply to message #293430] Tue, 30 October 2007 14:54 Go to previous messageGo to next message
Cat998
Messages: 1081
Registered: January 2004
Location: Austria, Vienna
Karma: 0
General (1 Star)
Moderator/Captain

Well, that was only an example.
Online tutorials and articles are good too.
I haven't found much useful information about C++ in PDFs yet...


When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"

Programming is like sex: one mistake and you have to support it for the rest of your life

Want the best answers? Ask the best questions!

"So long, and thanks for all the fish."

[Updated on: Tue, 30 October 2007 14:54]

Report message to a moderator

Re: donateC++ [message #293821 is a reply to message #293430] Tue, 30 October 2007 16:59 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

A good C++ book is the best way to learn C++ (Its how I learned C++ all those years ago)


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: donateC++ [message #293898 is a reply to message #293430] Wed, 31 October 2007 02:53 Go to previous messageGo to next message
cnc95fan is currently offline  cnc95fan
Messages: 1261
Registered: July 2007
Karma: 0
General (1 Star)
Can somone not just give him the code, he can read it, learn it and understand it..?
Re: donateC++ [message #293904 is a reply to message #293430] Wed, 31 October 2007 03:27 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

That is a bad way to learn because of two reasons:
- He won't know what to do when he wants to do something else.
- Someone here should write that code. => Support forums are to help people, not to do their jobs.

Quote:

A good C++ book is the best way to learn C++ (Its how I learned C++ all those years ago)
I don't agree. I never read a C++ book... At most a few pages. I learned everything I know about programming by downloading open source projects (scripts.dll, CuteNews), and intensively modding them/adding features/etc, until I'm able to build something new myself. If there is something I want to know, then I search for tutorials or other projects that are doing it.


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: donateC++ [message #293908 is a reply to message #293430] Wed, 31 October 2007 04:44 Go to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Perhaps it is a case of books are a good way of learning for som people, whilst others find other ways better to learn?
Everyone is different. I prefer books too.

Mafia, I don't think anyone around here is going to write it for you. But I will help...


Some useful functions for you that you will most likely need to use this are:

Get_Money(GameObject *Obj);
Give_Money(GameObject *Obj,float Money,bool EntireTeam);
Get_ID(GameObject *obj);
Get_Object_Type(GameObject *obj);
Get_Team(int PlayerID);
Get_Part_Names(const char *name1);
const wchar_t *Get_Wide_Player_Name(GameObject *obj);
GameObject *Get_GameObj(int PlayerID);



[Updated on: Wed, 31 October 2007 04:46]

Report message to a moderator

Previous Topic: Renegade Terrain downloads?
Next Topic: can u tell me what the parts of the script mean
Goto Forum:
  


Current Time: Tue Dec 03 14:52:36 MST 2024

Total time taken to generate the page: 0.01094 seconds