View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-26-2012 , 06:20   Re: NoSil (hides silencer on models)
Reply With Quote #31

Quote:
Originally Posted by Costin83 View Post
I think I made a little improvement to the code, though I don't know how to script... (when player spawns he would had the default silenced usp model until he switched weapons) now I've added a second check on item deploy so when the player spawns/drops his primary weapon it would update the model accordingly.

Also I've added a shield unsilenced usp model because we all know that when you have a shield the usp can't be silenced, and I believe this feature it's a "must" for this plugin.
Your code is wrong, you are checking read_data(2) from functions that are not events callbacks.
I've made it for you, cache the allocated models values so they are not allocated again and again (allocated string stays between map so if we can limit the increase to only 1 per map i think it is better )

I hope plugin author doesn't mind if i post this, just PM me if you want i remove it.

I haven't tested the plugin, let me know if models are not set correctly and in which situations.
Attached Files
File Type: sma Get Plugin or Get Source (nosil.sma - 987 views - 4.6 KB)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 02-26-2012 at 06:25.
ConnorMcLeod is offline