donateC++ [message #293430] |
Sun, 28 October 2007 23:38 |
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 #293490 is a reply to message #293430] |
Mon, 29 October 2007 07:53 |
|
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 #293583 is a reply to message #293510] |
Mon, 29 October 2007 14:44 |
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.
Creator: AoBFrost
|
|
|
Re: donateC++ [message #293588 is a reply to message #293510] |
Mon, 29 October 2007 14:59 |
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!
|
|
|
Re: donateC++ [message #293669 is a reply to message #293430] |
Tue, 30 October 2007 01:19 |
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 |
|
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 #293736 is a reply to message #293725] |
Tue, 30 October 2007 08:38 |
|
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 #293788 is a reply to message #293430] |
Tue, 30 October 2007 14:54 |
|
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 |
|
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 #293908 is a reply to message #293430] |
Wed, 31 October 2007 04:44 |
|
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
|
|
|