Some newbie problems
Hello everyone, i'm trying to make this plugin http://forums.alliedmods.net/showthread.php?t=87586
And so far, i encounted some problems: The idea of plugin is in one cfg file user sets amount of pistols, shotguns, rifles, e.t.c., sold in sub-buymenu, then, in another cfg file he sets their names, price and command to execute when item is bought (so this menu can support other plugins, like bazooka), plugin reads it all and build menu up. So the first problem is CVAR... Code:
public plugin_init()Code:
zp_cs_buymenu_pistol_count 3213Code:
register_cvar("zp_cs_buymenu_pistol_count", "1");The second problem - zp_cs_buymenu_pistol_count determines array size for zp_cs_buymenu_pistol_name[], zp_cs_buymenu_pistol_cost[], and zp_cs_buymenu_pistol_id[]. I tried: Code:
new zp_cs_buymenu_pistol_name[cvar_zp_cs_buymenu_pistol_count];Quote:
And the last thing - how can i make white, not red, numbers left to menu items? I tried puttin \w in menu item string, but it didn't help. |
Re: Some newbie problems
Quote:
|
Re: Some newbie problems
Not words, numbers left to the words.
Left is what i want, Right is what i got http://xmages.net/out.php/i144898_1.jpeg |
Re: Some newbie problems
Dynamic Arrays: I started by looking at mapchooser.sma Follow "g_mapName" for a string example.
Menu: What menu system are you using? Maybe the "new" menu system does it automatically. |
Re: Some newbie problems
\r makes the string after it go red
\w makes the string after it go white \d makes the string after it go grey \R alligns the menu to the right |
Re: Some newbie problems
Quote:
|
Re: Some newbie problems
Quote:
Quote:
fysiks Yes, new menu system. Is there any way to change it? Thank you for dynamic arrays hint! |
Re: Some newbie problems
Quote:
PHP Code:
http://xmages.net/out.php/i145022_1.jpg |
Re: Some newbie problems
"1. 9X19mm Sidearm\R400"
|
Re: Some newbie problems
Oh, thank you!)
New question - how to block default buymenu? My buymenu called by player's "buy" command, so for a moment you can see old buymenu...and how to create buyzone entity for the whole map? |
| All times are GMT -4. The time now is 09:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.