Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-14-2006, 01:44 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,655
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default game server mod

Well ive read about 5 chapters in my C++ book. Im comfortable working with the dev environment and i pretty much know the basic C++ stuff. However like I did when I first started php, i'm going to start with a project that is way over my head.

I want to make a simple server mod for this game I play. Basically what i want to do is (since the game is pretty old and there are a lot of cheaters playing) create a "Punt/Ban mod." Currently only the administrator of the server can punt/ban a player (can only be done server side.) I would like to create a mod that would allow players to punt a player after a certian ammount of votes. For example, I would type "punt kick 16" and then the server would reply "Vote 1 of 5 to kick player 16" then if 4 other people did that, it would have the server execute the punt command.


I guess the first step is to find out what the players are saying in the game, and therefor when the "punt kick" command is typed, the server can recogonize it and do what its suppose to do. So, when ever a player says something it is sent to the server and stored in these hex addresses (i think, at least thats what TSearch found):
0007EEC1C
0007EEC2C
0007EEC3C

The second part would be to execute the actual punt command. To do that, when it is "Vote 5 of 5" the server would punt the player. Ive seen some VB tutorials where u can just tell the server to press ~ and type "punt 16" like this:
Code:
Private Sub WriteText(Text As String)
   
    SendAMessage (Asc("~")) 'Press's ~ *brings up the chat propmt*.
   
    Sleep (50) 'Gives the chat propmt some time to initialize.
     
    Call WriteAscii(something goes here, Text) 'Writes text to the  prompt.

    Sleep (50) 'Gives sometime to the writing to finish.

    SendAMessage (vbKeyReturn) 'Press's ENTER *submits message*.

End Sub
but im not sure how to do that in C++. So if anyone can tell me some functions or things i should look into, i would appreciate it.

Thank You.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 08-14-2006, 03:23 PM
Ronin Ronin is offline
Programming Professional
 
Join Date: Apr 2006
Posts: 299
Rep Power: 10
Ronin is on a distinguished road
Default

Are you using just C++ or Visual C++? What IDE are you using?

Sounds like a neat mod. I've seen that event in some games I've played. What game is this one for?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-14-2006, 03:40 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,655
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default

the mod is for Delta Force: Black Hawk Down

and im using Visual C++ w/(Microsoft Visual Studio 2005)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-15-2006, 04:51 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,135
Rep Power: 16
Lop is on a distinguished road
Default

I'm not sure about accessing those addresses you give above.

The only thing I'm unsure about in porting your code to C++ is the SendAMessage (Asc("~")) line. SendAMessage is usually a winproc process or imported dll process. Do you see any imported dlls?
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-15-2006, 11:57 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,655
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default

Quote:
Originally Posted by Lop View Post
I'm not sure about accessing those addresses you give above.

The only thing I'm unsure about in porting your code to C++ is the SendAMessage (Asc("~")) line. SendAMessage is usually a winproc process or imported dll process. Do you see any imported dlls?
no there are no dll's, but the forum i got that code from made their own VB Module, perhaps SendAMessage is just a built in function of that module that the compiler resogonizes, but anyway i just used that as a psuedo code to try and get the point of what i want to do accrost.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 08-17-2006, 12:55 PM
Kaabi's Avatar   
Kaabi Kaabi is offline
Programming God
 
Join Date: Jul 2006
Posts: 884
Rep Power: 13
Kaabi is on a distinguished road
Default

I hope I can make something like that someday, but it will be hard since I'm not studying C++, ha.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-17-2006, 01:05 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,655
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default

Quote:
Originally Posted by Kaabi View Post
I hope I can make something like that someday, but it will be hard since I'm not studying C++, ha.
I hope i can make something like this too :P
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-17-2006, 08:08 PM
Ronin Ronin is offline
Programming Professional
 
Join Date: Apr 2006
Posts: 299
Rep Power: 10
Ronin is on a distinguished road
Default

Where did you get that code? Is there no tutorials for making game mods?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-20-2006, 10:01 AM
Sionofdarkness Sionofdarkness is offline
Programming Expert
 
Join Date: Jul 2006
Posts: 385
Rep Power: 10
Sionofdarkness is on a distinguished road
Default

Delta Force, aye? At first when I was reading it sounded a lot like a game I play, and I was excited because I thought it was going to be it, but I can see I was wrong.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a card game (multiplaye online with AI).. what do I program this in? anothersoldier General Programming 1 07-19-2007 06:46 AM
Paying for Links Chan Marketing 26 05-02-2007 08:37 PM
Global variables (SERVER) Jaan PHP Tutorials 0 03-22-2007 09:43 PM


All times are GMT -5. The time now is 11:54 PM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 66%

Ads