Need Help

Статус
В этой теме нельзя размещать новые ответы.

Cyborg

Новичок
Автор темы
1
0
Hi guys, I was wondering what do I need to make my own s0beit? Like how do I edit/add to the gui and insert some other stuff? Like rapid fire in s0beit and other hacks out there?
 

Jordy

Новичок
1
1
You will need:
Visual Studio (I recommend VS 2012) to compile mod_sa
Experience with C/C++
A lot more Experience if you plan on hooking functions
And of course the source code:
https://code.google.com/p/mod-s0beit-sa/downloads/list

You will see a .SLN file (This file can be opened with VS 2012)

You might encounter some issues while compiling the source code. Get the DirectX SDK
http://www.microsoft.com/en-us/download/details.aspx?id=6812

You might need the Lib And Include files from it.

Copy and paste them to a directory like this
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include
Of course the directory might be different

Before doing anything, you'll need Visual Studio.

Adding things will be difficult if you have little or no programming experience. I suggest you get familiar with the code by starting off doing something easy. How about a reconnect command?

Here is how you make something basic like your own reconnect command:

Open up the sln file and search for:
void init_samp_chat_cmds

Add the following line:
Код:
addClientCommand( "myreconnectcmd", (int)cmd_Reconnect ); //reconnects to the current server
Put this line at the bottom of init_samp_chat_cmds but not out of the function
cmd_Reconnect will not be defined until you make the function of course
You will see other client commands located there also

Above init_samp_chat_cmds () insert the following code (Not recommended if you want to keep the code clean)

Код:
//Created by Jordy
//Reconnects to the server you are currently connected to with a new name (Optional)
//If no name is given you will use the same name you're already connected with
void cmd_Reconnect ( char *param )
{
char Name[MAX_PLAYER_NAME];
int argc = sscanf(param, "%s", Name);
if (argc > 0) //we are reconnecting with a new name
{
if(strlen(Name) <= ALLOWED_PLAYER_NAME_LENGTH && strlen(Name) >= 3) //3-20 characters long
{
Name[ALLOWED_PLAYER_NAME_LENGTH] = '\0';
setLocalPlayerName(Name);
changeServer(g_SAMP->szIP, g_SAMP->ulPort, "");
}
else //name is not 3-20 characters long (let the person using the cmd know)
{
addMessageToChatWindow("Invalid Name. Name must be between 3-20 characters long.");
addMessageToChatWindow("Name Format: [a-z] [A-Z] [0-9]");
}
}
else //if you didn't enter a name you will reconnect with the same name
{
changeServer(g_SAMP->szIP, g_SAMP->ulPort, "");
}
}

I suggest not putting it above init_samp_chat_cmds though. Put it where the other client commands are defined (so you keep the code clean)

After you've done all that compile the code.
Click on Build -> Batch Build -> Check the box "mod_sa" and press ok

It should say: ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Now you just have to locate the d3d9.dll inside the source directory and copy / paste with your old d3d9.dll
Make sure mod_sa.ini has the following line enabled: mod_commands_activated = true
Run the game with the d3d9.dll you made and test it!

I'm not really sure what you mean by "Rapid Fire" you can do that by adjusting the game speed in the s0beit menu already.
Just look around in the source and see how things are done. With little or no experience, it's going to be confusing for you.
Find some C/C++ tutorials online

Happy Cheating / Developing
I hope this helped you a bit
 
  • Нравится
Реакции: q0_
Статус
В этой теме нельзя размещать новые ответы.