Thread: Knife menu
View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-01-2020 , 07:36   Re: Knife menu
Reply With Quote #9

@Supremache - you're once again trying to ruin a good plugin by creating a terrible alternative and suggesting other people to use it. 70% of your code is plain bad. Please learn how to write proper plugins before trying to recreate something that has already been done. Not only you hardcoded everything in the .sma file, but you didn't even use variables/defines to store the strings you use on 5 different places.

You didn't remember anything I explained to you previously. You're still using is_user_connected() and is_user_alive() in the same place even though I told you multiple times that is_user_alive() contains is_user_connected(). You're checking the same thing twice.

The "CurWeapon" function has an argument that lets you specify which weapon should tirgger it. You're using get_user_weapon() which is redundant. Also, how can the user change his weapon if he's not connected or not alive?

Code:
new x = knife[id];         switch(x) {             case 1: {

Why is all of this needed? There is only 1 knife in the menu and a simple if-check doesn't require "switch" nor unnecessary variables. Where is the default knife?

Why did you include cstrike, fun and hamsandwich?

Code:
menu_setprop(menu,MPROP_EXIT,MEXIT_ALL);

Again - why? This is already the default behavior for menus.

The knife skin won't even update when you select it until you change your weapon.

@itoxicreal - just use the plugin I provided. There's no point in using poorly written plugins.
__________________

Last edited by OciXCrom; 06-01-2020 at 07:42.
OciXCrom is offline
Send a message via Skype™ to OciXCrom