AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Custom Menu (https://forums.alliedmods.net/showthread.php?t=126296)

SaM.ThE.MaN 05-08-2010 03:57

Custom Menu
 
Greetings Modders,

As you can see i tried to add this weapon : http://forums.alliedmods.net/showthread.php?p=827532

To this custom Menu :

Quote:

#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("Beasts Cusom Menu", "0.1", "SaMThEMaN")
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
register_menucmd(register_menuid("Select a Weapon"), keys, "giveWeapon")
register_clcmd("/Menu", "showWeaponMenu")
}

public showWeaponMenu(id)
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2

format(menu, 191, "Which Weapon?^n^n1. M4A1^n2. AK47^n3. MP5^n4. GoldenAK")
show_menu(id, keys, menu)
return PLUGIN_HANDLED
}

public giveWeapon(id, key)
{
//key will start at zero
if (key == 0)
{
give_item(id, "weapon_ak47")
} else if (key == 1) {
give_item(id, "weapon_m4a1")
} else if (key == 2) {
give_item(id, "weapon_mp5navy")
} else if (key == 3) {
give_item(id, "GoldenAk.amxx")
}
}
But of course i failed, I wish some one could help and show me how to add 3rd party custom weapons and items to this menu,

Thank you

PS:
I want a Mentor that can teach me some of the basics in Plugin making, I want him to be a pro, and i learn fast so you have nothing to worry about

Arkshine 05-08-2010 04:53

Re: Custom Menu
 
You don't need a "mentor", start to learn to search, search on the forum/wiki/plugin, you will find numerous resources to learn the pawn. Learning fast or not depends how you are motivated.

SaM.ThE.MaN 05-08-2010 05:40

Re: Custom Menu
 
having a mentor makes it better, faster, really faster actually, and he can help me out in 10,000 ways

Arkshine 05-08-2010 05:55

Re: Custom Menu
 
No. You won't find "Tutor", do like all people who want to learn Pawn, follow the tutos, search, read the existent plugin, test yourself, and ask questions in the scripting section if need. It's wrong to say you will learn faster with someone, really wrong.

SaM.ThE.MaN 05-08-2010 08:16

Re: Custom Menu
 
your a pain in my -.-, can some one help me with this custom menu thing

Arkshine 05-08-2010 08:28

Re: Custom Menu
 
You are a pain in my -.- to try to do something far above your ability. You are again another beginner who want to do something but not willing to learn by following tutorials and such.

SaM.ThE.MaN 05-08-2010 09:43

Re: Custom Menu
 
Quote:

No. You won't find "Tutor", do like all people who want to learn Pawn, follow the tutos, search, read the existent plugin, test yourself, and ask questions in the scripting section if need. It's wrong to say you will learn faster with someone, really wrong.
When you said this the first time i started searching -.- and am working on my first plugin

fysiks 05-08-2010 16:40

Re: Custom Menu
 
PHP Code:

server_cmd("amx_goldenak ^"#%d^"", get_user_userid(id)) 


Quote:

Originally Posted by SaM.ThE.MaN (Post 1174139)
PS:
I want a Mentor that can teach me some of the basics in Plugin making, I want him to be a pro, and i learn fast so you have nothing to worry about

lol. Not gonna happen. Here at AlliedModders you learn it yourself. If you have problems then you can post. But first of all you need to read and test things on your own. So, it's kind of like everybody is a mentor and at the same time nobody is mentor. lol

SaM.ThE.MaN 05-08-2010 16:49

Re: Custom Menu
 
could you point out where that goes and what it does and what is this supposted to be #%d^ , I started learning on my own and thank you for the advice,
and i am asking those above questions since i am new to this.

fysiks 05-08-2010 16:57

Re: Custom Menu
 
Quote:

Originally Posted by SaM.ThE.MaN (Post 1174812)
could you point out where that goes and what it does and what is this supposted to be #%d^ , I started learning on my own and thank you for the advice,
and i am asking those above questions since i am new to this.

It gives them the Golden AK if that plugin is running correctly. From this answer you should know where to put it.

"%d" comes from here.

The "#" means the integer is being used as a userID.


All times are GMT -4. The time now is 03:49.

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