Hey guys anybody can give me an example how to optimize these part of code (with switch statement)
Code:
else if(equali(arg_cmd, "slay"))
{
if(!(get_user_flags(id) & ADMIN_SLAY))
{
ColorChat(id, NORMAL, "^4Only ADMINS can use the command!^4", Prefix)
return
}
if(equali(arg2, ""))
{
ColorChat(id, NORMAL, "^4You should enter some name!^4", Prefix)
return
}
if(!target)
{
ColorChat(id, NORMAL, "^4There is not a player wit this name!^4", Prefix, arg2)
return
}
client_cmd(id, "amx_slay ^"%s^"", arg2)
}