Git Product home page Git Product logo

plugin-sdk's Introduction

English

Plugin-SDK is a some kind of "dev-kit" for creating plugins for GTA2, GTA3, GTA: Vice City, GTA: San Andreas and GTA:IV.

How to use plugin-sdk?

  1. Install development environment (IDE) (Detailed: Installing development environment (IDE))
  2. Copy plugin-sdk to your compuer and set it up (Detailed: Set up plugin sdk)
  3. Create your first plugin! (Detailed: Creating a new plugin in plugin sdk)

Getting in touch with other developers

Русский

Plugin-SDK - это что-то вроде "dev-kit"-а для создания плагинов для GTA2, GTA3, GTA: Vice City, GTA: San Andreas и GTA:IV.

Как использовать plugin-sdk?

  1. Установите среду разработки (Подробнее: Установка среды разрабоки)
  2. Скопируйте plugin-sdk на свой компьютер и настройте его (Подробнее: Настройка plugin sdk)
  3. Создайте свой первый плагин! (Подробнее: Создание нового плагина в plugin sdk)

Свяжитесь с другими разработчиками

Contributors | Авторы:

  • Crspy (new versions)
  • DK22Pac (old, new versions)
  • fastman92 (old versions)
  • FrogByteDQ (new versions)
  • _AG (new versions)
  • quiret (new versions)
  • kenking (new versions)
  • LINK/2012 (old, new versions)
  • SilentPL (old versions)
  • MTA Team
  • Deji
  • listener
  • Wesser
  • Den_spb
  • Seemann
  • Alien
  • Ryosuke
  • sannybuilder.com guys
  • gtaforums.com coders

plugin-sdk's People

Contributors

codenulls avatar cookieplmonster avatar crspy avatar dk22pac avatar eightyvice avatar frogbytedq avatar gennariarmando avatar halo14- avatar hollywoodjack avatar imring avatar juniordjjr avatar kenkinggithub avatar likeawindrammer avatar m0r3f1x avatar megasware128 avatar nick7 avatar ojdoesit avatar parik27 avatar quiret avatar savagedd avatar shaggew avatar spmn avatar squ1dd13 avatar theartemmaps avatar thelink2012 avatar theoryofnekomata avatar user-grinch avatar vsergeenko777 avatar xmds avatar yugecin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin-sdk's Issues

GPS

Может кто обновить GPS в asi. пытался скомпилировать, только вот не работает он?

LINK1104: cannot open file 'plugin_d.lib'

How to resolve this is not written in the documentation.

It just happens that the plugin_d.lib file is just written in the project linker config as is (without a complete path).

Please vote! Should we use environment variables?

I'm going to update template generator for projects, and seriously thought about the possibility of using environment variables.

Should we use them for plugin-sdk projects? They can be used to determine the location of

  • CLEO SDK
  • DirectX SDK
  • GTA scripts
  • GTA cleo

directories.

It'll make it possible to use and compile plugin-sdk projects on different computers without any problems, without additional configuration of paths in project options.

What do you think?

Create project error

I create a VC ASI project after i install it on VS 2017, then it throw a alter "异常来自 HRESULT: 0x80041FE2" (means "Exception from HRESULT: 0x80041FE2")

Needs Documentation

If there's a issue, is that we need some documentation.
Doxygen is a good alternative for documenting libraries, we just need to make sure the methods, members, variables, etc, are properly documented with Doxygen style comments.

Then we just need to run Doxygen and done, we have a documentation.

Yeah, the hard part is documenting the already existing code... so make sure any new code has proper documentation.

Requests, sugestions, etc.

I'm seeing recent changes in CVector and CPathFind !

I use those classes a lot :

==========================================

CVector could have dot product as well : (vec1.x * vec2.x + vec1.y * vec2.y + vec1.z * vec2.z)

==========================================

Some extensions I needed for CPathFind (it would be good to have them in original class) :

obs.: some node address I put as Integer (ugly but made my life easier). Having automatic conversion (via operator) would be great.

void CPathFind_Ext::loadSceneForPathNodes(float X, float Y, float Z)
{ 
	((void(__thiscall *)(CPathFind *, float, float, float)) 0x44DE00)((CPathFind *)0x96F050, X, Y, Z);
}

char CPathFind_Ext::isAreaNodesAvailable(int AreaID)
{
	return ((char(__thiscall *)(CPathFind *, int)) 0x420AA0)((CPathFind *)0x96F050, AreaID);
}

CPathNode * CPathFind_Ext::getPathNode(int nodeAddr)
{
	return ((CPathNode *(__thiscall *)(CPathFind *, int)) 0x420AC0)((CPathFind *)0x96F050, nodeAddr);
}

int CPathFind_Ext::findRegionForCoors (float x, float y)
{
	return ((int(__thiscall *)(CPathFind *, float, float)) 0x44D830)((CPathFind *)0x96F050, x, y);
}

int CPathFind_Ext::findNodeClosestInRegion(int * outNodeInfo, int region, CVector pos, int nodeType, float * pDistance, char flag1, char flag2, char bBoatsOnly, int a11)
{
	return ((int(__thiscall *)(CPathFind *, int *, int , CVector , int , float *, char , char , char , int )) 0x44F2C0)((CPathFind *)0x96F050, outNodeInfo, region, pos, nodeType, pDistance, flag1, flag2, bBoatsOnly, a11);
}

float CPathFind_Ext::findNodeOrientationForCarPlacement(int nodeAddr)
{
	return ((float(__thiscall *)(CPathFind *, int)) 0x450320)((CPathFind *)0x96F050, nodeAddr);
}

float CPathFind_Ext::findNodeCoorsForScript(CVector *Coors, int node1, int node2, float *heading, BYTE *direction)
{
	return ((float(__thiscall *)(CPathFind *, CVector *, int, int, float *, BYTE *)) 0x450780)((CPathFind *)0x96F050, Coors, node1, node2, heading, direction);
}

float CPathFind_Ext::these2NodesAreAdjacent(int nodeA, int nodeB)
{
	return ((char(__thiscall *)(CPathFind *, int, int)) 0x44D230)((CPathFind *)0x96F050, nodeA, nodeB);
}

char CPathFind_Ext::ThisNodeWillLeadIntoADeadEnd(CPathNode * pNode_1, CPathNode * pNode_2)
{
	return ((char(__thiscall *)(CPathFind *, CPathNode*, CPathNode*)) 0x44D310)((CPathFind *)0x96F050, pNode_1, pNode_2);
}

==========================================

Visual Studio 2019 major issue (template)

UPDATE: Doesn't happen now, it's solved.

When I was installing plugin sdk, I noticed when clicking Visual Studio 2019 even with administrator rights did not install the template, multiple times I tried it. So I went ahead into the tools folder, and got the PluginSdkVsTools.vsix file and manually tried to install it by dragging on the VsixInstaller.exe, it threw this log and error:
image

02/06/2019 6:13:23 AM - Microsoft VSIX Installer
02/06/2019 6:13:23 AM - -------------------------------------------
02/06/2019 6:13:23 AM - vsixinstaller.exe version:
02/06/2019 6:13:23 AM - 16.1.3128
02/06/2019 6:13:23 AM - -------------------------------------------
02/06/2019 6:13:23 AM - Command line parameters:
02/06/2019 6:13:23 AM - C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VSIXInstaller.exe,C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VsixInstallerEe.vsix
02/06/2019 6:13:23 AM - -------------------------------------------
02/06/2019 6:13:23 AM - Microsoft VSIX Installer
02/06/2019 6:13:23 AM - -------------------------------------------
02/06/2019 6:13:23 AM - Initializing Install...
02/06/2019 6:13:24 AM - Extension Details...
02/06/2019 6:13:24 AM - Identifier : PluginSdkVSTools.ae8caae3-b338-4fb4-9a8c-505425687c53
02/06/2019 6:13:24 AM - Name : Plugin-SDK Visual Studio Tools
02/06/2019 6:13:24 AM - Author : Plugin-SDK
02/06/2019 6:13:24 AM - Version : 0.7.3.0
02/06/2019 6:13:24 AM - Description : Plugin-SDK Visual Studio Tools for creating plugins (ASI/CLEO/MoonLoader) for Grand Theft Auto.
02/06/2019 6:13:24 AM - Locale : en-US
02/06/2019 6:13:24 AM - MoreInfoURL : https://github.com/DK22Pac/plugin-sdk
02/06/2019 6:13:24 AM - InstalledByMSI : False
02/06/2019 6:13:24 AM - SupportedFrameworkVersionRange : [4.5,)
02/06/2019 6:13:24 AM -
02/06/2019 6:13:24 AM - SignatureState : Unsigned
02/06/2019 6:13:24 AM - Supported Products :
02/06/2019 6:13:24 AM - Microsoft.VisualStudio.Community
02/06/2019 6:13:24 AM - Version : [14.0,17.0)
02/06/2019 6:13:24 AM -
02/06/2019 6:13:24 AM - References :
02/06/2019 6:13:24 AM - Prerequisites :
02/06/2019 6:13:24 AM - -------------------------------------------------------
02/06/2019 6:13:24 AM - Identifier : Microsoft.VisualStudio.Component.CoreEditor
02/06/2019 6:13:24 AM - Name : Visual Studio core editor
02/06/2019 6:13:24 AM - Version : [15.0,)
02/06/2019 6:13:24 AM -
02/06/2019 6:13:24 AM - Signature Details...
02/06/2019 6:13:24 AM - Extension is not signed.
02/06/2019 6:13:24 AM -
02/06/2019 6:13:24 AM - Searching for applicable products...
02/06/2019 6:13:24 AM - Found installed product - Global Location
02/06/2019 6:13:24 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable1& skuData) at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported) at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported) at VSIXInstaller.App.Initialize(Boolean isRepairSupported) at VSIXInstaller.App.Initialize() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Missing files

3bcc5c8

This commit has added compilation units to the plugin_sa project that appear to be missing from the repository:

ScriptCommands.cpp
ScriptCommands.h
game_sa/CRunningScriptWrapper.cpp
game_sa/CRunningScriptWrapper.h

Compilation fails. I recommend to take care of this issue accordingly, the guy who made that commit basically. Like, are those files supposed to be still inside plugin-sdk? Seems like pretty temporary stuff to me.

Thanks.

Are there alternatives to RwIm2DRenderPrimitive?

I created something using RwIm2DRenderPrimitive, similar to what the GPS example does, but some people report that they don't see the lines.
Everyone that said it's not working is using integrated graphics (intel HD xxx), so I suppose some that might be the cause (same for me, I can't see them when I run SA using integrated graphics on my win8 laptop).

I'm mostly clueless about how to fix this, are there alternative ways to render primitives? Or can they do something to make it work for them (updating drivers etc)?

KeyPressed not working for vc?

`#include "plugin_vc.h"
#include "game_vc/CDraw.h"
#include "game_vc/CWeapon.h"
#include "game_vc/CPed.h"
#include "game_vc/CPlayerPed.h"
#include "game_vc/eWeaponType.h"
using namespace plugin;

class MyPlugin {
public:
MyPlugin() {
MessageBeep(true);

	if (KeyPressed(VK_F9))
	{
		MessageBeep(true);
		MessageBoxA(NULL, "LOL", "LOL", 0);
		CPlayerPed twojstary;
		twojstary.m_fArmour = 125.0;
		twojstary.GiveWeapon(WEAPONTYPE_M4, 9999, false);
		twojstary.GiveWeapon(WEAPONTYPE_MP5, 9999, false);
		MessageBeep(true);
	}
}

} myPlugin;`

No errors during compile, i get beep when plugin gets loaded, i press F9, nothing happens. Why ?

Edit: ok fixed, forgot processgame event, but now the player doesnt get armour and weapons, why?

How to target multiple games in one solution?

I tried copying project settings for each game into a single project with different build settings corresponding to each game (III, VC, SA). No luck because Visual Studio can't find the include files. How can I be able to accomplish this?

LNK

Before the git update I said that there was an error wich I did fix by myself but after that this appeared:
Error LNK1181 cannot open input file 'plugin.lib'

After today's update it still give me that error (with an additional line):
Severity Code Description Project File Line Suppression State Error MSB6006 "link.exe" exited with code 1181. GPS C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 676 Error LNK1181 cannot open input file 'plugin.lib' GPS C:\Users\ArminC\Desktop\plugin-sdk-master\examples\GPS\LINK 1

Are D3D9Headers really necessary?

This involves using Microsoft copyrighted headers, this doesn't look OK on redistributing those.
If the user wants to use D3D9 Headers, let him take care of it, besides, the necessary headers for complete RW header comes with most compilers.

So, my suggestion is to remove those headers from the project and assume they're installed on the target machine (as they probably are). There's also a define there to use or not to use D3D9 headers, you see, really, remove those goddamn Microsoft headers!

IDB Exporting

Could you share the tool you used for exporting the functions? I'd like to push missing functions for GTA3 to the repo.

SCMMod compatibility + merge with my project

Hello.
Have plugin-sdk a functionality to call SCM functions?
I have a repo which is broken now, but I collected a lot of useful addresses and SCM-functions you probably can include into plugin-sdk. It based on SCMMod by Spookie (you can Google it on Game Forums). Project developed only for VC.
I can contribute to a project and extend it when I understand how to use a plugin-sdk.

Привет.
Имеет ли plugin-sdk функционал для работы с функциями SCM?
У меня есть репозиторий, который давно забросил, но собрал в нём массу полезных адресов и SCM-функций, которые вы могли бы себе забрать.
Он основана на SCMMod от Spookie (его можно найти его на игровых форумах). Проект разработан только для VC.
Я могу присоединиться к проекту и расширить его, когда пойму, как им пользоваться.

Link/Ссылка: https://github.com/Serabass/vc-magic

error: 'auto' parameter not permitted in this context

Hi. I'm trying to compile a simple script but it gives me this error:
error: 'auto' parameter not permitted in this context
The problem is in line 33 of PluginBase.h. It says template<auto Func> is incorrect. My compiler is GNU GCC compiler. Is there any solution for that?

Visual Studio 2017?

Should we move to the new compiler/toolset?

Also what about the state of the three "tags" of plugin-sdk? Two are owned by LINK/2012, one of is DK22Pac. LINK's date to 2014. Can we clean up?

RwD3D9DDSTextureRead – Alpha?

Hi!

Any example for using DDS with alpha channel?

I have a DDS-file with alpha information:
RwD3D9DDSTextureRead(PLUGIN_PATH("logo"), PLUGIN_PATH("logo"));

  • doesn't work!

I have also tried to create a black/white dds file, for alpha:
RwD3D9DDSTextureRead(PLUGIN_PATH("logo"), PLUGIN_PATH("logo_alpha"));

  • doesn't work either!

Thanks for help.

I can't build My Project

I have created a new Vice City .Asi project, and I Press F5 to build this new project, then VS throw a error
LNK1181 cannot open input file 'plugin_vc.lib' Project2 c:\Users\XXX\documents\visual studio 2015\Projects\Project2\Project2\LINK 1
build configurations is rel

Constructor parameter for CPed::CPed is probably incorrect

Itis currently documented as being modelIndex but I suspect it should be pedType.
I hooked the constructor and I saw it being called with an even distribution of 4's and 5's and a lesser amount of 6's. That corresponds to Civmale, Civfemale and Cop respectively. They were definitely not the modelIndex's of the peds being spawned.

(I don't know if these files are auto-generated from another source, so I opened this issue first.
If it's okay to just send a PR I will.)

GPS dependencies Error - CFont

Error C3861 'SetAlignment': identifier not found
Error (active) E0135 class "CFont" has no member "SetAlignment"
Error (active) E0135 class "CFont" has no member "SetProp"
Error C2039 'SetAlignment': is not a member of 'CFont'
Error C2039 'SetProp': is not a member of 'CFont'
Error C3861 'SetProp': identifier not found GPS

Possible Fix (main.cpp):

CFont::SetAlignment(ALIGN_CENTER); -> CFont::SetOrientation(ALIGN_CENTER);
CFont::SetProp(true); -> CFont::SetProportional(true);

After:
Error LNK1181 cannot open input file 'plugin.lib'

d3dResetEvent missing parameter?

Hi!

The original Reset event looks like this:
IDirect3DDevice9::Reset(D3DPRESENT_PARAMETERS *pPresentationParameters)

Is there a way to add that parameter to d3dResetEvent?

void DResetEvent(D3DPRESENT_PARAMETERS *pPresentationParameters){}

Events::d3dResetEvent.Add(DResetEvent);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.