Thread: Loop And Menu
View Single Post
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-29-2018 , 12:32   Re: Loop And Menu
Reply With Quote #2

1. You've passed only one argument in string formation.
Code:
 format(text, 31, "%s - %s", name)
2. You have 'c' flag in get_players which means you wont get bots
so using is_user_bot is not required in handler, but you
should use is_user_connected cause before selecting an item
from menu (target) player may disconnect from the game

================
For efficiency do not convert player index to string and vice versa.
Use following style:

=> SET
new ItemInfo[2];
ItemInfo[0] = <PlayerIndex>;
menu_additem(...., ...., ItemInfo, ...)
=> GET
new ItemInfo[2];
menu_item_getinfo(..., ..., ..., ItemInfo, charsmax(ItemInfo), ....);
<PlayerIndex> = ItemInfo[0];
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 12-29-2018 at 12:37.
Ghosted is offline