Raised This Month: $32 Target: $400
 8% 

Skin System 2.33


Post New Thread Reply   
 
Thread Tools Display Modes
Timo137
Junior Member
Join Date: Jul 2021
Old 07-21-2021 , 09:35   Re: Skin System 2.33
Reply With Quote #31

https://steamcommunity.com/sharedfil...?id=2553312658

the knife is in my legs? how can i fix it?

and /mykills not work

Last edited by Timo137; 07-21-2021 at 09:36.
Timo137 is offline
Timo137
Junior Member
Join Date: Jul 2021
Old 07-23-2021 , 10:34   Re: Skin System 2.33
Reply With Quote #32

some ideas?
Timo137 is offline
Robbin
Junior Member
Join Date: May 2020
Location: Aveiro, Portugal
Old 07-23-2021 , 22:20   Re: Skin System 2.33
Reply With Quote #33

Quote:
Originally Posted by Timo137 View Post
some ideas?
/mykills is working for me.
It could be some conflicting plugin causing the bug.
Try to enable only SkinSystem.amxx for testing.

Last edited by Robbin; 07-23-2021 at 22:22.
Robbin is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-29-2021 , 08:14   Re: Skin System 2.2
Reply With Quote #34

Quote:
Originally Posted by HamletEagle View Post
This plugin may be cool if it would be done correctly.
PHP Code:
 Skin[31][SKINSPERWEAPONS],
vSkinMdl[31][SKINSPERWEAPONS][64], pSkinMdl[31][SKINSPERWEAPONS][64],
SkinName[31][SKINSPERWEAPONS][32], 
Instead of hardcoded customizations limit you can use dynamic arrays(or even better, tries, as key save the original weapon name), so anyone can add as much things as they want.

For your information, any array that should be used with player index must have 33 as dimension, not 31.

PHP Code:
register_event("CurWeapon","WeaponModel","be","1=1"); 
Use Ham_Item_Deploy, instead of this.

PHP Code:
get_user_name(PlayerName31); 
Use charsmax() to get string-array size.

PHP Code:
set_task(1.0"LoadPoints"Player); 
Why a delay here ?

PHP Code:
new Weapon get_user_weapon(Player); 
This initialization should be done under the check to see if player is valid.

PHP Code:
if(strlen(vSkinMdl[Weapon][x]) > 5)
set_pev(Playerpev_viewmodel2vSkinMdl[Weapon][x]);
if(
strlen(pSkinMdl[Weapon][x]) > 5)
set_pev(Playerpev_weaponmodel2pSkinMdl[Weapon][x]); 
Indent your code properly.

Using static in plugin_precache(which is called only one time) is useless.
read_file is deprecated native, use new file natives. You should also check if model path is fully valid(it has models/player/model_name and also .mdl extension) and if it exists on the server before precaching it(file_exists can do the job).

If I'm not wrong, you read the skin file two times. Why ?
Instead of intializing new strings, parse directly with vSkinMdl[Num][Already[Num]], so you won't have to call copy.

PHP Code:
new Motd[1024], Line[256];
    
formatex(Line255"<body bgcolor=^"black^">^n<font color=^"red^">^n");
    
add(Motd1023Line255);
    
formatex(Line255"<p align=^"center^">%s %s by: %s</p></font>^n<font color=^"greenyellow^">^n"PLUGINVERSIONAUTHOR);
    
add(Motd1023Line255); 
This just get repedeted every time. For me, it seems that you should do this one time, and add later the things that are context dependent(I mean that can get changed).

Don't acces cvar values inside a loop, cache it before.

There are other improvements that can be done, but this is something to start with(the most obvious mistakes).
If you decide to fix these issues please let me know. For the time being, this is going to be unapproved.
__________________
HamletEagle is offline
jorconnn
Junior Member
Join Date: Sep 2020
Old 04-25-2022 , 10:52   Re: Skin System 2.33
Reply With Quote #35

How add player models?
jorconnn is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode