Raised This Month: $51 Target: $400
 12% 

Knife Mod


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-18-2012 , 06:20   Re: Knife Mod
Reply With Quote #11

You should merge LongJump code into Jump forward, because that is where is should be done, then you don't need PreThink anymore.
For bhop thing, i think you can completely remove UpdateClientData and waterjump checks, i'm not even sure it can ever happen. Also, i'm sure you really want to divide velocity by 3 when player press use button, may be you could remove it.

Also :
PHP Code:
new g_bHasSkin1;
new 
g_bHasSkin2;
new 
g_bHasSkin3;
new 
g_bHasSkin4;
new 
g_bHasSkin5;
new 
g_bHasSkin6;
new 
g_bHasSkin7;
new 
g_bChoseSkin1;
new 
g_bChoseSkin2;
new 
g_bChoseSkin3;
new 
g_bChoseSkin4;
new 
g_bChoseSkin5;
new 
g_bChoseSkin6;
new 
g_bChoseSkin7
The bit method there is not appropriated at all, change it.
And about models, don't hardcode them,
also about players models cs_set_user_model is a deprecated method, consider hooking SetClientKeyValue.


[php] RegisterHam(Ham_Killed, "player", "Fwd_PlayerKilled_Pre", 0);
RegisterHam(Ham_Killed, "player", "Check_Alive", 1);[*php]

Reading at pre forward code, i don't see why it would be needed to execute it before the function has been executed, unless you have a good reason to do it, merge code into post forward.



My global impression, sorry about it, is that you have taken code from few plugins, but that may be, i don't really know, you don't have enough knowledge to support it, or to see when something should be changed because of the fact all plugins are in the same code.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-18-2012 , 11:04   Re: Knife Mod
Reply With Quote #12

Quote:
Originally Posted by ConnorMcLeod View Post
The bit method there is not appropriated at all, change it.
And about models, don't hardcode them,
also about players models cs_set_user_model is a deprecated method, consider hooking SetClientKeyValue.
what exactly do you mean with that?


Quote:
My global impression, sorry about it, is that you have taken code from few plugins, but that may be, i don't really know, you don't have enough knowledge to support it, or to see when something should be changed because of the fact all plugins are in the same code.
Yes well you are right, I tought it be useless to recode already existing plugins so i just merged them into one to let my plugin work with the other plugins without working with includes.
Like you said my coding knowledge is limited but i try to do what i can, I released this plugin becous i feel like it's a good one & i'm against selling plugins when the coder who made it is not a professional coder.

I myself code as a hobby, there are tons of things i dont know yet but then again there is alot that i do know already.
striker07 is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-19-2012 , 08:50   Re: Knife Mod
Reply With Quote #13

Plugin updated to V1.6,
Added the function for players to sell their perm's.

Bugfixes: Several will items and perms are now given after 2 secs becous on 35hp maps it didnt work becous of the delay that you where put into the map

Last edited by striker07; 05-19-2012 at 08:50.
striker07 is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-24-2012 , 13:55   Re: Knife Mod
Reply With Quote #14

Conor: I still don't understand what you mean with hardcoding the models;
how can I do it more efficiently.

i have heard from servers running this plugin that sometimes the model of a player is set to every player, dont ask me how i have no clue. cant find a reasonable explanation for it exept "hardcoding" that yuo say but i do not know what you mean with it or how else to do it,
with pev? i dont think that would matter becous the principle of setting the models would still remain the same.

give some more explanation for this pls
striker07 is offline
drop
Member
Join Date: Oct 2010
Location: my room
Old 05-27-2012 , 10:33   Re: Knife Mod
Reply With Quote #15

This mod ir really awesome , Thanks for makeing it !
But I have a prob , player skins don't work , only Ts/Ct's/VIP but when I buy other skins , they don't show up.

EDIT :
found the problem my self ! Didn't read the whole text at the begining.

didn't know that .sma file doesn't have
precache_model("models/player/skinname/skinname.mdl");

EDIT 2 : how to delete all data that has been saved ?

Last edited by drop; 05-27-2012 at 13:08.
drop is offline
Send a message via Skype™ to drop
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-27-2012 , 14:35   Re: Knife Mod
Reply With Quote #16

Quote:
Originally Posted by drop View Post
EDIT 2 : how to delete all data that has been saved ?
I guess you could just remove the vault files from your server so that the server remakes them at the next first run.

but from my expierence that doesnt end up always well, it might be better that i make a prune function.

Add this to the sma:
PHP Code:
public plugin_init() {
 
register_concmd("clearvaults""clear_vaults"ADMIN_RCON"Cleared All Data");
 
register_concmd("resettokens""clear_tokens_vault"ADMIN_RCON"Cleared Tokens Data");
 
register_concmd("resetpermanents""clear_bits_vault"ADMIN_RCON"Cleared Permanent Data");
}
 
public 
clear_vaults()
{
 if(
g_vault)
  
nvault_prune(g_vault0get_systime());
 if(
bitvault)
  
nvault_prune(bitvault0get_systime());
}
public 
clear_tokens_vault() {
 if(
g_vault)
  
nvault_prune(g_vault0get_systime());
}
public 
clear_bits_vault() {
 if(
bitvault)
  
nvault_prune(bitvault0get_systime());

That should do it, didnt test tough.
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 05-27-2012 at 14:52.
striker07 is offline
drop
Member
Join Date: Oct 2010
Location: my room
Old 05-27-2012 , 14:51   Re: Knife Mod
Reply With Quote #17

Quote:
Originally Posted by striker07 View Post
I guess you could just remove the vault files from your server so that the server remakes them at the next first run.

from my expierence that doesnt end up always well, it might be better that i make a prune function
I deleted everything from vault folder , deleted vault.ini , but nothing happend ... still got all the points and all the items...

Last edited by drop; 05-27-2012 at 14:52.
drop is offline
Send a message via Skype™ to drop
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-27-2012 , 14:57   Re: Knife Mod
Reply With Quote #18

Quote:
Originally Posted by drop View Post
I deleted everything from vault folder , deleted vault.ini , but nothing happend ... still got all the points and all the items...
Did you delete the journal files to?
anyway leave it be and use the commands, probably much better
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]
striker07 is offline
drop
Member
Join Date: Oct 2010
Location: my room
Old 05-27-2012 , 15:03   Re: Knife Mod
Reply With Quote #19

Quote:
Originally Posted by striker07 View Post
Did you delete the journal files to?
anyway leave it be and use the commands, probably much better
Yes , deleted that too.

umm but here a prob , so I added those lines into the .sma , but where do i type that clear_vaults and stuff ?
I can accses only to server rcon , but not it's whole console.
I typed in-game console rcon clear_vaults , but nothing...

EDIT :
And you could add ir .cfg file a way to add more weapons that can be bought. trough .sma it's hard to do.

EDIT2 : Found a nasy bug... don't know how it activates , but sometimes the weapons slashes so fast , that it looks like speedhack.

EDIT3 : players can just enter the game and they alredy have few skin's that can only be bought...

Last edited by drop; 05-27-2012 at 16:50.
drop is offline
Send a message via Skype™ to drop
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-27-2012 , 19:19   Re: Knife Mod
Reply With Quote #20

Quote:
Originally Posted by drop View Post
Yes , deleted that too.

umm but here a prob , so I added those lines into the .sma , but where do i type that clear_vaults and stuff ?
I can accses only to server rcon , but not it's whole console.
I typed in-game console rcon clear_vaults , but nothing...

EDIT : And you could add ir .cfg file a way to add more weapons that can be bought. trough .sma it's hard to do.

EDIT2 : Found a nasy bug... don't know how it activates , but sometimes the weapons slashes so fast , that it looks like speedhack.

EDIT3 : players can just enter the game and they alredy have few skin's that can only be bought...
If you have the admin flag k (Rcon flag) then go in game, open your console and simply type clearvaults or resettokens or resetpermanents. it should reset the vault

for edit2: when exactly does this happen? what did the player buy or what did he do that activated this bug.
i have already checked for that bug but failed to find the cause. (my bold guess is that it has something to do with the save and loadbits)

edit3: are they wearing those skins already? if so can they wear that skin when they type "skins".
This has something to do with hardcoding of the models but as i said previously to connor i dont know how else to do it. waiting for his response, if he will respond that is.
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]
striker07 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 12:31.


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