Quantcast

Jump to content

» «
Photo

Creating .asi files for gta sa.

22 replies to this topic
Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#1

Posted 22 July 2012 - 08:28 PM

How can I do? C++ or C# or VB ?

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#2

Posted 22 July 2012 - 09:01 PM

Yes, all 3 will probably work. I wouldn't recommend VB, though...

Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#3

Posted 22 July 2012 - 09:10 PM

is there any tutorial?

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#4

Posted 22 July 2012 - 09:36 PM

Yeah, millions. Google "C++ Tutorial".

Here's one: http://www.cplusplus.com/doc/tutorial/

It's not an overnight thing, you know.

Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#5

Posted 22 July 2012 - 09:39 PM

QUOTE (Deji @ Sunday, Jul 22 2012, 21:36)
Yeah, millions. Google "C++ Tutorial".

Here's one: http://www.cplusplus.com/doc/tutorial/

It's not an overnight thing, you know.

about asi files.

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci Racing
  • Joined: 30 Jan 2011
  • Brazil

#6

Posted 22 July 2012 - 09:56 PM

A asi is a dll renamed.
Just write a dll in C/C++/Whatever, compile, rename to asi, fun. Of course you can set the compiler to output the file directly to asi.


Some kind of Hello World, can give you some direction...
CODE
#include <Windows.h>

BOOL APIENTRY DllMain( HMODULE hModule,
                      DWORD  ul_reason_for_call,
                      LPVOID lpReserved
     )
{
switch (ul_reason_for_call)
{

 case DLL_PROCESS_ATTACH:
  MessageBoxA(NULL, "HAI WORLD!", "Attach", NULL);
  break;

 case DLL_PROCESS_DETACH:
   MessageBoxA(NULL, "THX, BYE", "Detach", NULL);
   break;

 case DLL_THREAD_ATTACH:
 case DLL_THREAD_DETACH:
  break;
}
return TRUE;
}

Michael-Knight1
  • Michael-Knight1

    Never Give UP

  • Members
  • Joined: 08 Jul 2012

#7

Posted 22 July 2012 - 11:47 PM

@Saint Burak When You Learn C++ Language Tutorial , You Can To Know Creating Asi File wink.gif

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#8

Posted 23 July 2012 - 12:37 PM

QUOTE (Saint Burak @ Jul 22 2012, 20:28)
How can I do? C++ or C# or VB ?


QUOTE (Deji @ Jul 22 2012, 21:01)
Yes, all 3 will probably work. I wouldn't recommend VB, though...


It isn't really possible in C# directly, because there is no dllmain. Also working with ASM is not supported and everything needs to be unsafe to use pointers. If you want to use C#, you will also need C++.

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#9

Posted 07 August 2012 - 01:08 PM

I am tired from trying to make working .asi files,
i am having code blocks for these Works,

after putting Link's Code,
i build it,
CODE

-------------- Build: Release in MSG ---------------

Compiling: main.cpp
Linking dynamic library: bin\Release\MSG.dll
Creating library file: bin\Release\libMSG.dll.a
Output size is 6.50 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings

then i put the msg.dll file into root dir of VC,
i thought i'll get a MSG box "HAI WORLD!"
but Nooothing sad.gif again

is there anything to do with "libMSG.dll.def" file ???

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci Racing
  • Joined: 30 Jan 2011
  • Brazil

#10

Posted 07 August 2012 - 03:40 PM Edited by Link2012, 08 August 2012 - 02:44 AM.

I know a guy that was trying to make a ASI in Code Blocks and has the same result: Nothing!
He tried in MSVC and worked fine...

Should be something with GCC (MinGW on Win)

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#11

Posted 07 August 2012 - 07:43 PM

Is there a windows version of Code::Blocks with the windows api? I thought it was linux only.

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#12

Posted 07 August 2012 - 07:49 PM

QUOTE (Bad.boy! @ Tuesday, Aug 7 2012, 20:43)
Is there a windows version of Code::Blocks with the windows api? I thought it was linux only.

What makes you ask this question here?
Isn't it faster to check the answer in Google?

Yes. There is Code Blocks for Windows.

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#13

Posted 08 August 2012 - 12:53 PM

QUOTE
I know a guy that was trying to make a ASI in Code Blocks and has the same result: Nothing!
He tried in MSVC and worked fine...

This Was My story lol.gif
TNK U,

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#14

Posted 08 August 2012 - 04:42 PM

Google didn't work (I'm on a sh*tty hotel wifi).

xNCx
  • xNCx

    Street Cat

  • Members
  • Joined: 15 May 2008
  • None

#15

Posted 23 August 2012 - 11:09 PM

Interesting topic, thanks Link2012 for the sample code. I am not familiar with C or anything else, I just had visual basic in school wink.gif .

I googled now for 2-3 hours to find a way how to write memory using a dll, got many results, but they are not working at all, I get an error while compiling the code or crash while writing the memory ( http://www.p-program...e-funkcji-cz-2/ second example on that page, I used other memory addresses and still crash). I'm using Visual C++ 2008 Express.

So, could someone post a full example in "noob style" biggrin.gif how to write a memory address? I'll be thankful for this.

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#16

Posted 24 August 2012 - 11:59 AM

Read this: link

Example:
CODE
DWORD* CMoney = (DWORD*)0xB7CE50;
*CMoney = 100;


I don't know much about vb, but in C# you can use pointers in unsafe code (not used alot).

Meklood
  • Meklood

    Player Hater

  • Members
  • Joined: 19 Jan 2013

#17

Posted 29 January 2013 - 11:58 AM

How can i create from saloader's .dll file an asi file? If i rename the dll to asi, the game crashing, but with dll extension work good. Another asi files work correctly.

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#18

Posted 29 January 2013 - 04:29 PM

What do you mean with saloader? The asi loader has to be a dll file (vorbisFile & vorbisHooked).
And don't bump old topics.

TheGodfather.
  • TheGodfather.

    Nobody likes me here...I think...

  • Members
  • Joined: 19 Jun 2012

#19

Posted 29 January 2013 - 04:41 PM

Well as the topic is bumped already ..Can someone suggest me a good C++ IDE for making ASI Plugins ??
Don't lock the topic as it has become useful now..

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci Racing
  • Joined: 30 Jan 2011
  • Brazil

#20

Posted 29 January 2013 - 05:05 PM Edited by Link2012, 29 January 2013 - 05:09 PM.

QUOTE (arijitsen @ Tuesday, Jan 29 2013, 13:41)
Well as the topic is bumped already ..Can someone suggest me a good C++ IDE for making ASI Plugins ??
Don't lock the topic as it has become useful now..

Visual Studio.

@Topic
Good to have this bumped, I managed to compile a working ASI with MinGW, you just have to mark DllMain with a [extern "C"] and hey, it works!
e.g.
CODE
extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)


MinGW\GCC ASM Block is harder to do than Visual Studio ASM block, and also uses AT&T syntax and I don't like it, Intel syntax owns.

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#21

Posted 02 July 2013 - 01:36 PM

I am interested too to make some ASI plugin.
we/I am need a tutorial contains existing identifier word that work to the game. and the way of writing too.

indo_14
  • indo_14

    Player Lover

  • Members
  • Joined: 27 Oct 2011
  • Red-Cross

#22

Posted 08 May 2014 - 12:32 AM

is there connection between CLEO and ASI plugin, i mean the codes, sorry for bumps

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#23

Posted 08 May 2014 - 02:45 AM

What a beautiful BUMP!!!
 

Yes, an .asi file AKA "Cleo.asi" load them to the Game,





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users