So something like this should stop them from opening the shopmenu?
public OnW3Denyable(W3DENY:event, client)
{
if(event==DN_CanBuyItem1){
W3Deny();
War3_ChatMessage(client,"%T","You can't buy shopmenu items",client);
}
}
If so, that's awesome! Any chance you could do something similar for the levelbank? The idea for the levelbank is to create a truly grinding race, that as you level up it gets harder and which can't be leveled up by tomes or levelbank.
EDIT: ignore the lack of usual checking functions (raceid, validplayer, etc)
EDIT2: Also, if I understand correctly, does that also mean I could then test EventArg1 for which item it is and block individual items only? eg -
public OnW3Denyable(W3DENY:event, client)
{
if( War3_GetRace( client ) == thisRaceID && ValidPlayer( client ) && ShopmenuToggle[client] == true)
{
if(event==DN_CanBuyItem1)
{
new item = W3GetVar(EventArg1);
decl String:itemname[64];
W3GetItemName(item,itemname,sizeof(itemname));
if(StrEqual(itemname, "necklace"))
{
W3Deny();
War3_ChatMessage(client,"%T","You can't buy the necklace this round.",client);
}
else if(StrEqual(itemname, "shield"))
{
W3Deny();
War3_ChatMessage(client,"%T","You can't buy the shield this round.",client);
}
}
}
}