Would these 2 work the same way?
Code:
public showMenu(id,key) {
if(!cs_get_user_buyzone(id)) {
client_print(id,3,"You must be in a buyzone to purchase that!")
return PLUGIN_HANDLED
}
switch(key) {
case 0: // blah blah
case 1: // blah blah
case 2: // blah blah
}
}
// AND
public showMenu(id,key) {
switch(key) {
case 0: {
if(!cs_get_user_buyzone(id)) {
client_print(id,3,"You must be in a buyzone to purchase that!")
return PLUGIN_HANDLED
}
}
case 1: {
if(!cs_get_user_buyzone(id)) {
client_print(id,3,"You must be in a buyzone to purchase that!")
return PLUGIN_HANDLED
}
}
case 2: {
if(!cs_get_user_buyzone(id)) {
client_print(id,3,"You must be in a buyzone to purchase that!")
return PLUGIN_HANDLED
}
}
}
return PLUGIN_HANDLED
}
__________________