Raised This Month: $ Target: $400
 0% 

What is wrong??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tobbiass
Junior Member
Join Date: Dec 2011
Old 12-21-2011 , 11:17   What is wrong??
Reply With Quote #1

#include <hamsandwich>
#include <fun>
#include <fakemeta>

public plugin_init()
{
register_clcmd("say /shop","Menu2");
}

public Menu2(id)
{
new menu = menu_create( "\rSHOP! Tobias:", "menu_handler");
new menu = menu_create( "\wGrenade menu:", "Grenade menu");
menu_additem(menu, "\r#1 \wHE!", "1", 0);
menu_additem(menu, "\r#2 \wFLASH!", "2", 0);
menu_additem(menu, "\r#3 \wSMOKE!", "3", 0);
}
public Menu3(id)
{
new menu = menu_create( "\wWeapon menu:", "Weapon menu");
menu_additem(menu, "\r#4 \wAK47!", "4", 0);
menu_additem(menu, "\r#5 \wM4A1", "5", 0);
menu_additem(menu, "\r#6 \wAWP", "6", 0);
menu_additem(menu, "\r#7 \wDEAGLE!", "7", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}

public menu_handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName, charsmax(szName), callback);
new key = str_to_num(data);
switch(key)

{
case 1:
client_print(id, print_chat, "NICE! You choosed HE!");
cs_set_user_money (id, cs_get_user_money ( id ) - 4000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_he"), 1 )
}
case 2:
{
client_print(id, print_chat, "NICE! You choosed FLASH!");
cs_set_user_money (id, cs_get_user_money ( id ) - 2000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_he"), 2 )
}
case 3:
client_print(id, print_chat, "NICE! You choosed SMOKE!");
cs_set_user_money (id, cs_get_user_money ( id ) - 3000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_smoke"), 1)
{
case 4:
{
client_print(id, print_chat, "NICE! You choosed AK47!");
cs_set_user_money ( id, cs_get_user_money ( id ) - 8000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_ak47" ), 90 )
}
case 5:
{
client_print(id, print_chat, "NICE! You choosed M4A1!");
cs_set_user_money ( id, cs_get_user_money ( id ) - 7000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_m4a1" ), 90 )
}
case 6:
{
client_print(id, print_chat, "NICE! You choosed AWP!");
cs_set_user_money ( id, cs_get_user_money ( id ) - 12000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_awp" ), 30 )
}
case 7:
{
client_print(id, print_chat, "NICE! You choosed DEAGLE!");
cs_set_user_money ( id, cs_get_user_money ( id ) - 3500 )
cs_set_weapon_ammo ( give_item ( id, "weapon_deagle"), 7 )
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
tobbiass is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-21-2011 , 12:13   Re: What is wrong??
Reply With Quote #2

Are you crazy???!?!?!?

Or what?!?!?!!?!??!
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
tobbiass
Junior Member
Join Date: Dec 2011
Old 12-21-2011 , 12:20   Re: What is wrong??
Reply With Quote #3

Yeah, i have edit it? But now i cant compile it? why
tobbiass is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 12-21-2011 , 13:09   Re: What is wrong??
Reply With Quote #4

Three threads now...

Quote:
Originally Posted by fysiks View Post
  • Don't make a new thread for the same thing. Post it in your old one.
Quote:
Originally Posted by fysiks View Post
Also, when posting code, use [php][/php] around your code.
You need this more than anything.
__________________

Last edited by joshknifer; 12-21-2011 at 13:09.
joshknifer is offline
Send a message via Skype™ to joshknifer
tobbiass
Junior Member
Join Date: Dec 2011
Old 12-21-2011 , 21:44   Re: What is wrong??
Reply With Quote #5

Why didnt my ColorChat working? I have included it?
PLEASE HELP
When i try to compile it, it says: It couldnt read ColorChat.
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < hamsandwich >
#include < fun >
#include < fakemeta >
#include < ColorChat >

public plugin_init() {
register_clcmd("say /shop","Menu2");
register_clcmd("say_team /shop","Menu2");
}

public Menu2(id) {
new menu = menu_create( "\rSHOP! Tobias:", "menu_handler");
menu_additem(menu, "\r#1 \wAK47", "1", 0);
menu_additem(menu, "\r#2 \wM4A1", "2", 0);
menu_additem(menu, "\r#3 \wAWP", "3", 0);
menu_additem(menu, "\r#4 \wDEAGLE", "4", 0)
menu_additem(menu, "\r#5 \wHE", "5", 0 )
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}

public menu_handler(id, menu, item){
if (item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName, charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
ColorChat( id, GREEN, "^03You have just bought an ^04AK47"
cs_set_user_money ( id, cs_get_user_money ( id ) - 5000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_ak47" ), 90 )
}
case 2:
{
ColorChat( id, GREEN, "^03You have just bought a ^04M4A1"
cs_set_user_money ( id, cs_get_user_money ( id ) - 5000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_m4a1" ), 90 )
}
case 3:
{
ColorChat( id, GREEN, "^03You have just bought an ^04AWP"
cs_set_user_money ( id, cs_get_user_money ( id ) - 10000 )
cs_set_weapon_ammo ( give_item ( id, "weapon_awp" ), 30 )
}
case 4:
{
ColorChat( id, GREEN, "^03You have just bought a ^04Deagle"
cs_set_user_money(id, cs_get_user_money(id) - 3500)
cs_set_weapon_ammo( give_item (id, "weapon_deagle"), 20 )
}
case 5:
{
ColorChat( id, GREEN, "^03You have just bought a ^04HE Grenade"
cs_set_user_money( id, cs_get_user_money (id ) - 300 )
cs_set_weapon_ammo( give_item ( id, "weapon_hegrenade"), 1 )
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}

Last edited by tobbiass; 12-21-2011 at 21:48.
tobbiass is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 12-21-2011 , 22:48   Re: What is wrong??
Reply With Quote #6

YOu do not have ColorChat.inc in your included files.
__________________
Snaker beatter is offline
tobbiass
Junior Member
Join Date: Dec 2011
Old 12-22-2011 , 05:55   Re: What is wrong??
Reply With Quote #7

Yeah, it works now, thank you!

But how can i add in a weapon, then it had 30 shoots and 90 ammo?

Last edited by tobbiass; 12-22-2011 at 06:29.
tobbiass is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-22-2011 , 06:59   Re: What is wrong??
Reply With Quote #8

I will do it for you with 1 condition = Stop Spamming ( SS )
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
tobbiass
Junior Member
Join Date: Dec 2011
Old 12-22-2011 , 06:59   Re: What is wrong??
Reply With Quote #9

How can i do, then i write /shop there comming 3 menus like:
Weapon menu
Grenade menu
Item menu
And when you click on weapon menu there will come: M4A1, AK47, DEAGLE
and when you click on grenade menu there will come: HE,FLASH, SMOKE
and when you click on item menu there will come: Armor, and something else.

Please help me !: )
tobbiass is offline
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 12:09.


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