Git Product home page Git Product logo

Comments (32)

ifarbod avatar ifarbod commented on June 12, 2024 1

Could you at least use Markdown blocks to format your code? It looks ugly and hard to read.

Something like this:

void Test() { return; }

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

Hello Kewun0!

Your issue sounds similar to #23
Solution was to find "plugin.sln" and compile in Debug configuration, for you I think plugin_sa.

If it does not solve your problem, could you elaborate further?

from plugin-sdk.

 avatar commented on June 12, 2024

Already fixed, but now getting other shitton load of errors. unresolved symbols, etc
example :

  1. http://imgur.com/a/M1dJs
  2. http://imgur.com/a/U40Jk

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

In plugin-sdk you have to include headers that you need.

https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_III/game_III/CPlayerPed.h

Try doing: #include "game_III/CPlayerPed.h"

Important: create Peds using "new" operator (never on stack!)

from plugin-sdk.

 avatar commented on June 12, 2024

errors

Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CEntity.obj) 1
Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CEntity.obj) 1
Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CMatrix.obj) 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CMatrix.obj) 1
Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CPhysical.obj) 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CPhysical.obj) 1
Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CPlaceable.obj) 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CPlaceable.obj) 1
Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CPlayerPed.obj) 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in Main.obj Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III.lib(CPlayerPed.obj) 1
Error LNK1319 10 mismatches detected Project1 D:\Grand Theft Auto III\plugins\Project1_d.asi 1

from plugin-sdk.

 avatar commented on June 12, 2024
#include` "plugin_III.h"
#include "game_III/CPlayerPed.h"
using namespace plugin;

class MyPlugin {
public:
    MyPlugin() {
        if (KeyPressed(VK_SHIFT))
        {
            CPlayerPed Player;
            Player.Remove();
        }
    }
} myPlugin;

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

Btw, have you tried using the plugin-sdk project wizard inside the "tools" folder? It is very useful, because you get many templates in Visual Studio :)

image

image

To fix your problem please change the runtime library setting in your project, like

image

from plugin-sdk.

 avatar commented on June 12, 2024

i used the wizard, also the settings are same as in your screenshot.

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

Sorry for the inconvenience! There is a small bug in the wizard. Please change this setting:

image

from plugin-sdk.

 avatar commented on June 12, 2024

same errors...

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

Are you sure? Please post the complete error log again. I would like to take a look at it.

from plugin-sdk.

 avatar commented on June 12, 2024

https://pastebin.com/wtCea7wX

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

Your log says it uses "plugin_III.lib". Are you sure you changed library to "plugin_III_d.lib"?

from plugin-sdk.

 avatar commented on June 12, 2024

yes. http://imgur.com/a/ky7vi

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

Please try changing the Configuration to Debug and try again
image

We understand that using Visual Studio for the first time can be difficult :)

from plugin-sdk.

 avatar commented on June 12, 2024

Now i get only the error as in title, missing plugin_iii_d.lib
Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'plugin_III_d.lib' Project1 C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\LINK 1

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

Open plugin.sln and build the "plugin_III" project in Debug mode.
image

Has the issue been fixed? :-)
We are glad to help you.

from plugin-sdk.

 avatar commented on June 12, 2024

Done, and changed, now when i try build
https://pastebin.com/ZHr5QCA0

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

I have several questions to you.

  • you seem to have a plugin-sdk lib here: C:\Users\Dom\Documents\Visual Studio 2017\Projects\Project1\Project1\plugin_III_d.lib
    This is not the default plugin-sdk folder, yes? Have you updated this file with the correct version? This does not look like a wizard-created project.
  • Have you changed back the "plugin_III_d.lib" in Release configuration to "plugin_III.lib"?

from plugin-sdk.

 avatar commented on June 12, 2024
  1. yes, updated, and is wizard created project
  2. no

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024
  1. then please try :)

from plugin-sdk.

 avatar commented on June 12, 2024

Same errors

from plugin-sdk.

quiret avatar quiret commented on June 12, 2024

I have assigned DK22Pac to this issue. I hope this issue with project-wiazard will be fixed. I suggest you wait till he is here ;-)

Or you carefully check that you changed everything properly, again.

from plugin-sdk.

DK22Pac avatar DK22Pac commented on June 12, 2024

Please follow these steps:

  1. Download or update your plugin-sdk folder with latest changes.
  2. Open plugin-sdk\plugin.sln and build solution in Release and Debug modes.
  3. Close Visual Studio
  4. Go to Documents\Visual Studio 2017\Templates\ProjectTemplates and delete Plugin-SDK folder there.
  5. Open Command Prompt for VS2017 and run this command: devenv /installvstemplates
  6. Open plugin-sdk\tools\plugin-sdk-project-wizard\plugin-sdk-project-wizard.exe, setup it and press Generate
  7. Open Command Prompt for VS2017 and run this command: devenv /installvstemplates
  8. Open Visual Studio and create a new project.

from plugin-sdk.

 avatar commented on June 12, 2024

everything done, still this annoying error plugin_iii.lib cant open
But when i compile on release mode, no errors, but the plugin does not work i press F6 and nothing happens CODE: https://pastebin.com/8n5WF1SW

from plugin-sdk.

DK22Pac avatar DK22Pac commented on June 12, 2024

It looks like Visual Studio still loads old templates from cache.
And about your code, it is not correct.
You should add everything you want to do with peds/vehicles into gameProcessEvent, for example:

#include "plugin_III.h"
#include "game_III\common.h"

using namespace plugin;

class MyPlugin {
public:
    MyPlugin() {
        Events::gameProcessEvent += [] {
            CPed *playa = FindPlayerPed();
            if (playa && KeyPressed(VK_F6)) {
                playa->m_fHealth += 1.0f;
            }
        };
    }
} myPlugin;

And also, developing of plugin-sdk for GTA III is just started, so there's not much you can do with it at this moment.

from plugin-sdk.

 avatar commented on June 12, 2024

This needs documentation ;/

from plugin-sdk.

 avatar commented on June 12, 2024

after your solution
http://imgur.com/a/zxISg

from plugin-sdk.

 avatar commented on June 12, 2024

..

from plugin-sdk.

 avatar commented on June 12, 2024

fixed every error, but

#include "plugin_III.h"
#include "game_III\common.h"

using namespace plugin;

class MyPlugin {
public:
    MyPlugin() {
        Events::gameProcessEvent += [] {
            CPed *playa = FindPlayerPed();
            if (playa && KeyPressed(VK_F6)) {
                playa->m_fHealth += 1.0f;
            }
        };
    }
} myPlugin;

doesnt work, i press F6, and i dont get +1 health

from plugin-sdk.

 avatar commented on June 12, 2024

Now i know why, this doesnt work on gta 3 1.1 ...

from plugin-sdk.

DK22Pac avatar DK22Pac commented on June 12, 2024

We support only exe 1.0 version.

from plugin-sdk.

Related Issues (20)

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.