Raised This Month: $84 Target: $400
 21% 

Golden weapons for vip


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Abdelrhmanreda170
Junior Member
Join Date: Jun 2018
Old 09-10-2019 , 19:57   Golden weapons for vip
Reply With Quote #1

HELLO ,
I HEAR THAT ALOT OF PEAPLE WANT A PLUGIN LIKE THAT SO I DECIDED TO DO IT ,,
HERE YOU ARE
Some Info
1-Only player with flag ADMIN_LEVEL_H CAN USE IT !
2- HOW TO USE { MAKE A FOLDER IN MODELS NAME knife_vip ADD ALL THE MODELS IN IT ..
ADD VIP_WEAPON,AMXX IN PLUGIN FOLDER,, ADD vip_weapons in plugin.ini }
Attached Files
File Type: sma Get Plugin or Get Source (vip_weapons.sma - 30 views - 10.5 KB)
File Type: amxx vip_weapons.amxx (3.7 KB, 6 views)
File Type: zip Knife_vip.zip (7.41 MB, 10 views)
Abdelrhmanreda170 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-10-2019 , 21:58   Re: Golden weapons for vip
Reply With Quote #2

So you decided to register the curweapon event 19 times ... very good ...
__________________
iceeedr is offline
Send a message via Skype™ to iceeedr
Abdelrhmanreda170
Junior Member
Join Date: Jun 2018
Old 09-10-2019 , 22:04   Re: Golden weapons for vip
Reply With Quote #3

i think it's work no problem in it !!
Abdelrhmanreda170 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-11-2019 , 07:28   Re: Golden weapons for vip
Reply With Quote #4

What did my eyes just witness there...

If you don't know how to make plugins - don't make plugins. It's that simple.

Hardcoded, poorly coded, against the rules.

Quote:
Originally Posted by Abdelrhmanreda170 View Post
i think it's work no problem in it !!
Yes, no problem. Only that ALL 19 of those functions are called EACH TIME you shoot a bullet and every single check is executed 19 times + you're checking 19 times if the player has the *hardcoded* admin flag.

Don't post garbage like that here. When you grow up and get some experience in what you're doing, then you can think about sharing an actual plugin with the world.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Foxa
Junior Member
Join Date: Nov 2018
Location: Croatia
Old 09-11-2019 , 11:44   Re: Golden weapons for vip
Reply With Quote #5

Nicely coded, easy approve, 10/10
Foxa is offline
Smilex_Gamer
Member
Join Date: Apr 2017
Location: Portugal
Old 09-11-2019 , 12:40   Re: Golden weapons for vip
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
Only that ALL 19 of those functions are called EACH TIME you shoot a bullet and every single check is executed 19 times + you're checking 19 times if the player has the *hardcoded* admin flag.
I guess he tried to do the same as this:

Code:
new const WEAPONENTNAMES[][] = { "", "weapon_p228", "", "weapon_scout", "weapon_hegrenade", "weapon_xm1014", "weapon_c4", "weapon_mac10",
			"weapon_aug", "weapon_smokegrenade", "weapon_elite", "weapon_fiveseven", "weapon_ump45", "weapon_sg550",
			"weapon_galil", "weapon_famas", "weapon_usp", "weapon_glock18", "weapon_awp", "weapon_mp5navy", "weapon_m249",
			"weapon_m3", "weapon_m4a1", "weapon_tmp", "weapon_g3sg1", "weapon_flashbang", "weapon_deagle", "weapon_sg552",
			"weapon_ak47", "weapon_knife", "weapon_p90" }

public plugin_init()
{
	for (new i = 1; i < sizeof WEAPONENTNAMES; i++)
		if (WEAPONENTNAMES[i][0]) RegisterHam(Ham_Item_Deploy, WEAPONENTNAMES[i], "fw_Item_Deploy_Post", 1)
}
But instead of using Ham_Item_Deploy, he thought that it would be a good idea to use CurWeapon event.

P.S: There's more code in this obviously, but the point is just registering the event.

Last edited by Smilex_Gamer; 09-11-2019 at 12:42.
Smilex_Gamer is offline
thEsp
Veteran Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 09-11-2019 , 15:10   Re: Golden weapons for vip
Reply With Quote #7

Quote:
Originally Posted by Foxa View Post
Nicely coded, easy approve, 10/10
20/10
__________________
thEsp is offline
Abdelrhmanreda170
Junior Member
Join Date: Jun 2018
Old 09-11-2019 , 17:38   Re: Golden weapons for vip
Reply With Quote #8

Quote:
Originally Posted by ocixcrom View Post
what did my eyes just witness there...

If you don't know how to make plugins - don't make plugins. It's that simple.

Hardcoded, poorly coded, against the rules.



Yes, no problem. Only that all 19 of those functions are called each time you shoot a bullet and every single check is executed 19 times + you're checking 19 times if the player has the *hardcoded* admin flag.

Don't post garbage like that here. When you grow up and get some experience in what you're doing, then you can think about sharing an actual plugin with the world.
i'am new in that , so if you can make this plugin with anthor code make it !
__________________
J17
Abdelrhmanreda170 is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-11-2019 , 18:31   Re: Golden weapons for vip
Reply With Quote #9

Quote:
Originally Posted by Abdelrhmanreda170 View Post
i'am new in that , so if you can make this plugin with anthor code make it !
example :
Code:
#include <amxmodx> #include <engine> //No models available new NOT_GOLDEN[][] = {         "weapon_knife",         "weapon_c4",            "weapon_p228",         "weapon_mp5navy",         "weapon_ump45",         "weapon_scout",                    "weapon_hegrenad",         "weapon_flashban",         "weapon_smokegre" } new MODELS[][] = {         "models/Knife_vip/v_m4a1.mdl",         "models/Knife_vip/p_m4a1.mdl",         "models/Knife_vip/v_ak47.mdl",         "models/Knife_vip/p_ak47.mdl",         "models/Knife_vip/v_deagle.mdl",         "models/Knife_vip/p_deagle.mdl",         "models/Knife_vip/v_aug.mdl",         "models/Knife_vip/p_aug.mdl",         "models/Knife_vip/v_awp.mdl",         "models/Knife_vip/p_awp.mdl",         "models/Knife_vip/v_famas.mdl",         "models/Knife_vip/p_famas.mdl",         "models/Knife_vip/v_g3sg1.mdl",         "models/Knife_vip/p_g3sg1.mdl" ,         "models/Knife_vip/v_galil.mdl" ,         "models/Knife_vip/p_galil.mdl" ,         "models/Knife_vip/v_elite.mdl" ,         "models/Knife_vip/p_elite.mdl" ,         "models/Knife_vip/v_glock18.mdl" ,         "models/Knife_vip/p_glock18.mdl" ,         "models/Knife_vip/v_m249.mdl" ,         "models/Knife_vip/p_m249.mdl" ,         "models/Knife_vip/v_mac10.mdl" ,         "models/Knife_vip/p_mac10.mdl" ,         "models/Knife_vip/v_mp5.mdl" ,         "models/Knife_vip/p_mp5.mdl" ,         "models/Knife_vip/v_p90.mdl",         "models/Knife_vip/p_p90.mdl" ,         "models/Knife_vip/v_sg550.mdl",         "models/Knife_vip/p_sg550.mdl" ,         "models/Knife_vip/v_sg552.mdl",         "models/Knife_vip/p_sg552.mdl" ,         "models/Knife_vip/v_usp.mdl" ,         "models/Knife_vip/p_usp.mdl" ,         "models/Knife_vip/v_xm1014.mdl" ,         "models/Knife_vip/p_xm1014.mdl" ,         "models/Knife_vip/v_m3.mdl" ,         "models/Knife_vip/p_m3.mdl" } public plugin_precache() {         for (new i; i<sizeof MODELS; i++)         {                 precache_model(MODELS[i])         } } public plugin_init() {         register_plugin("Golden Weapon Skins" , "1.0" , "LearninG")         register_event("CurWeapon", "checkWeapon", "be","1=1") }        public checkWeapon(id) {         static wpnName[16] , vmodel[32] , pmodel[32]         get_weaponname(get_user_weapon(id) , wpnName , charsmax(wpnName))         for (new i; i<sizeof NOT_GOLDEN; i++)         {                 if (equali(wpnName , NOT_GOLDEN[i]))                 return PLUGIN_HANDLED         }         copy(vmodel , charsmax(vmodel) , wpnName)         replace_all(vmodel, charsmax(vmodel), "weapon_", "")         copy(pmodel , charsmax(pmodel) , vmodel)         format(vmodel , charsmax(vmodel) , "models/Knife_vip/v_%s.mdl" , vmodel)         format(pmodel , charsmax(pmodel) , "models/Knife_vip/p_%s.mdl" , pmodel)         entity_set_string(id, EV_SZ_viewmodel , vmodel)         entity_set_string(id, EV_SZ_weaponmodel, pmodel)         return PLUGIN_CONTINUE }

Last edited by LearninG; 09-12-2019 at 01:23.
LearninG is online now
Reply


Thread Tools
Display Modes

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 08:07.


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