Raised This Month: $ Target: $400
 0% 

This Plugin that i made ha a bug HELP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 04-02-2019 , 13:49   This Plugin that i made ha a bug HELP
Reply With Quote #1

after i made plugin i entered the lan server but the plugin is not working.
Attached Files
File Type: sma Get Plugin or Get Source (sadas.sma - 300 views - 3.1 KB)
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 04-02-2019 , 22:50   Re: This Plugin that i made ha a bug HELP
Reply With Quote #2

Your cs_set_user_model model path is wrong.

It should be something like this
Quote:
cs_set_user_model(id, "urban")
Your SetModel function lacks setting the custom model too

Quote:
format(Model,55, g_PlayerModels[item])
The model is not going to set it self.

PHP Code:
formatex(szItemcharsmax(szItem), "\rKnife \wMenu");     formatex(szPredatorcharsmax(szPredator), "\wPredator");     formatex(szSoniccharsmax(szSonic),"\wSonic");     formatex(szBatMancharsmax(szBatMan), "\wBat Man");     formatex(szIronMancharsmax(szIronMan), "\wIron Man");     formatex(szDoctorcharsmax(szDoctor), "\wToxic");     formatex(szDeadPoolcharsmax(szDeadPool), "\wUfo");     formatex(szNinjacharsmax(szNinja), "\wNaruto");     formatex(szTurtlecharsmax(szTurtle), "\wBlueBerete");     formatex(szBinLadencharsmax(szBinLaden), "\wBin Laden");     formatex(szAssasinscharsmax(szAssasins), "\wAssasin"); 
What is this? Are you trying to do an old menu on top of a new menu?
These are literally adding nothing to the menu in your case. You have to use menu_additem

Edit: There's some other mistakes, I'll work it out when I get on my computer.

Last edited by Moody92; 04-02-2019 at 23:05.
Moody92 is offline
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 04-03-2019 , 01:38   Re: This Plugin that i made ha a bug HELP
Reply With Quote #3

Quote:
Originally Posted by Moody92 View Post
Your cs_set_user_model model path is wrong.

It should be something like this


Your SetModel function lacks setting the custom model too



The model is not going to set it self.

PHP Code:
formatex(szItemcharsmax(szItem), "\rKnife \wMenu");     formatex(szPredatorcharsmax(szPredator), "\wPredator");     formatex(szSoniccharsmax(szSonic),"\wSonic");     formatex(szBatMancharsmax(szBatMan), "\wBat Man");     formatex(szIronMancharsmax(szIronMan), "\wIron Man");     formatex(szDoctorcharsmax(szDoctor), "\wToxic");     formatex(szDeadPoolcharsmax(szDeadPool), "\wUfo");     formatex(szNinjacharsmax(szNinja), "\wNaruto");     formatex(szTurtlecharsmax(szTurtle), "\wBlueBerete");     formatex(szBinLadencharsmax(szBinLaden), "\wBin Laden");     formatex(szAssasinscharsmax(szAssasins), "\wAssasin"); 
What is this? Are you trying to do an old menu on top of a new menu?
These are literally adding nothing to the menu in your case. You have to use menu_additem

Edit: There's some other mistakes, I'll work it out when I get on my computer.
can you make examble
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 04-03-2019 , 02:27   Re: This Plugin that i made ha a bug HELP
Reply With Quote #4

now why not work
it shows menu but when i choose model not work

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>


#define PLUGIN "Admin Model Menu"
#define VERSION "1.0"
#define AUTHOR "Husam"

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /model", "model_menu")
}

public plugin_precache() {  
	
	precache_model("models/Player/Predator.mdl")  
	precache_model("models/Player/Sonic.mdl")  
	precache_model("models/Player/Bat_Man.mdl")
	precache_model("models/Player/Iron_Man.mdl")  
	precache_model("models/Player/Toxic.mdl")  
	precache_model("models/Player/Ufo.mdl")
	precache_model("models/Player/Naruto.mdl")  
	precache_model("models/Player/BlueBerete.mdl")  
	precache_model("models/Player/Bin_Laden.mdl")
	precache_model("models/Player/Assassin.mdl")
}
		
public model_menu(id)	
{
	new menu = menu_create("\yPlayer \wModel \rMenu", "PlayerMenu_Handler")
	menu_additem(menu, "\rPredator", "1", 0)
	menu_additem(menu, "\rSonic", "2", 0)
	menu_additem(menu, "\rBat Man", "3", 0)
	menu_additem(menu, "\rIron Man", "4", 0)
	menu_additem(menu, "\rToxic", "5", 0)
	menu_additem(menu, "\rUfo", "6", 0)
	menu_additem(menu, "\rNaruto", "7", 0)
	menu_additem(menu, "\rBlue Berete", "8", 0)
	menu_additem(menu, "\rBin Laden", "9", 0)
	menu_additem(menu, "\rAssassin", "10", 0)
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL );
	menu_display(id, menu, 0 );
	
	return PLUGIN_HANDLED;
} 


public PlayerMenu_Handler(id, menu, item)
{
    if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    new data[6], iName[64]
    new acces, callback
    menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
    
    new key = str_to_num(data)
    
    switch(key)
    { 
       case 1 : cs_set_user_model(id, "Predator")
       case 2 : cs_set_user_model(id, "Sonic")
       case 3 : cs_set_user_model(id, "Bat_Man")
       case 4 :	cs_set_user_model(id, "Iron_Man")
       case 5 : cs_set_user_model(id, "Toxic")
       case 6 : cs_set_user_model(id, "Ufo")
       case 7 : cs_set_user_model(id, "Naruto")
       case 8 :	cs_set_user_model(id, "Blue_Berete")
       case 9 : cs_set_user_model(id, "Bin_Laden")
       case 10 : cs_set_user_model(id, "Assassin")
    }
    menu_destroy(menu)
    return PLUGIN_HANDLED
}

Last edited by husam124; 04-03-2019 at 02:30.
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 04-03-2019 , 02:48   Re: This Plugin that i made ha a bug HELP
Reply With Quote #5

Quote:
Originally Posted by husam124 View Post
can you make examble
First off
Quote:
models/Player/Predator.mdl
---->

Quote:
models/Player/Predator/Predator.mdl

Second of all, why are you doing this?

PHP Code:
    if(cs_get_user_team(id) == CS_TEAM_T)
    {
        
cs_set_user_model(id"models/Player/terror/terror.mdl" )
        return 
PLUGIN_HANDLED;
    }
    else if(
cs_get_user_team(id) == CS_TEAM_CT)
        
cs_set_user_model(id"models/Player/urban/urban.mdl" 
This makes absolutely no sense, you're trying to change the player's model but you set a default model in the process.

Why would you put your menu handler "VERSION" which is defined as 1.0
PHP Code:
new menu menu_createszItemVERSIONg_PlayerSkins[item] ); 
This is the native
PHP Code:
native menu_create(const title[], const handler[], ml=0); 
Try this, Untested.
Attached Files
File Type: sma Get Plugin or Get Source (sadas.sma - 285 views - 2.8 KB)

Last edited by Moody92; 04-03-2019 at 02:52.
Moody92 is offline
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 04-03-2019 , 02:52   Re: This Plugin that i made ha a bug HELP
Reply With Quote #6

I will
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 04-03-2019 , 03:00   Re: This Plugin that i made ha a bug HELP
Reply With Quote #7

its work can you remove plugin
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 04-03-2019 , 03:05   Re: This Plugin that i made ha a bug HELP
Reply With Quote #8

No can do.
Moody92 is offline
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 04-03-2019 , 03:24   Re: This Plugin that i made ha a bug HELP
Reply With Quote #9

remove it
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
HiDeath
Senior Member
Join Date: Aug 2018
Location: Tunisia
Old 04-03-2019 , 04:32   Re: This Plugin that i made ha a bug HELP
Reply With Quote #10

Quote:
Originally Posted by husam124 View Post
remove it
i stole it now , and can use it , nihahahahah

Last edited by HiDeath; 04-03-2019 at 04:33.
HiDeath 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 04:28.


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