safra36 / PlayerSkin

A simple playerskin manager plugin with useful features
20 stars 5 forks source link

[BUG] Arms Skin Players #11

Closed crashzk closed 4 years ago

crashzk commented 4 years ago

BUG Arms Skins Players

The arms of the skins are bugged in the players.

Before I thought it was the skin in question, I tested several and the same problem.

However I did the test with the same skins, with a different plugin, in this case I used store.smx to do the test, everything works fine with the skins and arms.

Print of the BUG in question: image

crashzk commented 4 years ago

I don't know if it has anything to do, but I noticed this flood on the server console:

[PlayerSkin] Gloves detected, skipping setting arms ...

[PlayerSkin] Gloves detected, skipping setting arms ...

[PlayerSkin] Gloves detected, skipping setting arms ...
crashzk commented 4 years ago

I tried to talk to the author of the Plugin Gloves, to see if it wasn't something in the plugin, he answered me like this:

If you are using Custom Player OR Arms Models on your server, you have to modify the plugin that does the model changing, and make it use Gloves_SetArmsModel native function instead. Or your players arms will be invisible if they do not use any gloves.

image It would be possible to make your plugin compatible with Plugin Gloves?

crashzk commented 4 years ago

@safra36 any news about plugin updates? Fix?

safra36 commented 4 years ago

@crashzk hey, sorry to reply this late, making a compatible version with that native wouldn't be a big deal you may just edit the lines 228 235 239 and replace them with Gloves_SetArmsModel(int client, const char[] armsModel); (make sure to set the arms model to the correct variable and don't forget to include the inc file)

crashzk commented 4 years ago

Thank you, I will try here, anything I return the contact.

crashzk commented 4 years ago

@safra36 changed it, leave it like this:

    if(!StrEqual(model, "", false))
    {
        SetEntityModel(client, model);

        if(!IsClientWithArms(client))
        {
            if(!StrEqual(arms, "", false))
            {
                Gloves_SetArmsModel(int client, const char[] armsModel);
            }
            else
            {
                int g_iTeam = GetClientTeam(client);
                if(g_iTeam == 2)
                {
                    Gloves_SetArmsModel(int client, const char[] armsModel);
                }
                else if(g_iTeam == 3)
                {
                    Gloves_SetArmsModel(int client, const char[] armsModel);
                }
            }
        }
        else
        {
            PrintToServer("[PlayerSkin] Gloves detected, skipping setting arms ...");
        }

        return true;
    }

However, when compiling this error:

//SourceMod Batch Compiler
// by the SourceMod Dev Team

//// PlayerSkin.sp
//
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : error 017: undefined symbol "Gloves_SetArmsModel"
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : error 029: invalid expression, assumed zero
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : warning 215: expression has no effect
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : error 029: invalid expression, assumed zero
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : fatal error 190: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
//
// Compilation Time: 0,19 sec
// ----------------------------------------

Press enter to exit ...

Could explain better how to define the weapons model for variable, I believe that is it.

safra36 commented 4 years ago

@crashzk have you included the inc file on the top? and you may use it like this: Gloves_SetArmsModel(client, arms);

crashzk commented 4 years ago

@safra36 compiled now, only one warning was generated in the compiler log:

//SourceMod Batch Compiler
// by the SourceMod Dev Team

//// PlayerSkin.sp
//
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(1491) : warning 204: symbol is assigned a value that is never used: "err"
// Code size:            36940 bytes
// Data size:             9284 bytes
// Stack/heap size:      16384 bytes
// Total requirements:   62608 bytes
//
// 1 Warning.
//
// Compilation Time: 0,48 sec
// ----------------------------------------

Press enter to exit ...

I will be testing this version with Gloves and see if the BUG is resolved, anything will return contact.

tydaytygx commented 4 years ago

@safra36 changed it, leave it like this:

  if(!StrEqual(model, "", false))
  {
      SetEntityModel(client, model);

      if(!IsClientWithArms(client))
      {
          if(!StrEqual(arms, "", false))
          {
              Gloves_SetArmsModel(int client, const char[] armsModel);
          }
          else
          {
              int g_iTeam = GetClientTeam(client);
              if(g_iTeam == 2)
              {
                  Gloves_SetArmsModel(int client, const char[] armsModel);
              }
              else if(g_iTeam == 3)
              {
                  Gloves_SetArmsModel(int client, const char[] armsModel);
              }
          }
      }
      else
      {
          PrintToServer("[PlayerSkin] Gloves detected, skipping setting arms ...");
      }

      return true;
  }

However, when compiling this error:

//SourceMod Batch Compiler
// by the SourceMod Dev Team

//// PlayerSkin.sp
//
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : error 017: undefined symbol "Gloves_SetArmsModel"
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : error 029: invalid expression, assumed zero
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : warning 215: expression has no effect
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : error 029: invalid expression, assumed zero
// C:\Users\boy-l\Google Drive\ZK ServidoresÖ\Servidores\Counter-Strike Global Offensive\Editar Plugins\addons SM1.10\sourcemod\scripting\PlayerSkin.sp(182) : fatal error 190: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
//
// Compilation Time: 0,19 sec
// ----------------------------------------

Press enter to exit ...

Could explain better how to define the weapons model for variable, I believe that is it.

Hi crashzk, I have same issue of your compile errors How could you finally fix these errors?

safra36 commented 4 years ago

@tydaytygx there is already a version with this code complied, you may find it in plugins folder named as PlayerSkin_GloveSupport.smx

tydaytygx commented 4 years ago

@tydaytygx there is already a version with this code complied, you may find it in plugins folder named as PlayerSkin_GloveSupport.smx

@safra36 Thanks, I' ve tried that version just now, but after I type !skins in my server, the skins menu wasn't shown, so I want to compile for a new one to fix the issue

safra36 commented 4 years ago

@tydaytygx there are no major changes to !skins command, the only thing changed is the way skins are being set, so in order for that to work you need to have kgns glove plugin, the reason !skins does not work is the plugin is not leaded at all since you may not have that installed

tydaytygx commented 4 years ago

@tydaytygx there are no major changes to !skins command, the only thing changed is the way skins are being set, so in order for that to work you need to have kgns glove plugin, the reason !skins does not work is the plugin is not leaded at all since you may not have that installed

@safra36 Yeah, the old version plugin works fine on my server, I remove the old one and plug in the new one, and I sm plugins reload it, but nothing happens when typing !skins.

safra36 commented 4 years ago

@tydaytygx okay, i'll be releasing a new version with supporting delay to set arms, imo the only reason arms are getting bugged is because gloves are being set first, and i will be removing the glove support version and add a section for people to do it them selves (shouldn't be hard at all)

tydaytygx commented 4 years ago

@tydaytygx okay, i'll be releasing a new version with supporting delay to set arms, imo the only reason arms are getting bugged is because gloves are being set first, and i will be removing the glove support version and add a section for people to do it them selves (shouldn't be hard at all)

@safra36 Thanks for your reply and your hard-working goods, now the main issue is the PlayerSkin_GloveSupport.smx It have no effect after plugging into the server. But the PlayerSkin.smx works fine, except the original csgo arms and server-side model show the same time like the first quote that @crashzk post.

safra36 commented 4 years ago

@tydaytygx the glove plugin will have effect once you install kgns glove plugin, that plugin is needed for the main plugin to load otherwise it just won't load

tydaytygx commented 4 years ago

@tydaytygx the glove plugin will have effect once you install kgns glove plugin, that plugin is needed for the main plugin to load otherwise it just won't load

@safra36 Oh thanks, I misunderstood the plugin's meaning.

Ramiretee commented 4 years ago

I am in the same here. I did nothing because I did not understand, but I write to let you know. d('-'

image

Im using kgns weapons and gloves, and the tf2 heavy model

safra36 commented 4 years ago

@Ramiretee have you followed my guide on how to add support for kgns's plugin?

tydaytygx commented 4 years ago

@safra36 Hey safra36, I've tested your latetest plugins. But the delay-set-arm function seems not to take effect, have you tested on your own server? Should I replace all the file of the old edition with new version? Or I just need to replace the PlayerSkin.smx?

safra36 commented 4 years ago

@tydaytygx yes i figured that today morning, the issue is that there is not allowed character for arms to store, that's a simple issue that will be fixed in a future push there is also some other bugs that need to be fixed before that

safra36 commented 4 years ago

This issue should be solved, i will close this issue but if anything came up, just open a new one, thanks for contributing